From 14d6e33768d8e727d1eb401bddfcf9eb492f0b59 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 7 Jan 2023 20:40:57 +0100 Subject: [PATCH] fixed wolf shape in Clifford torus --- 3d-models.cpp | 2 +- hyperpoint.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index 077cc532..1109effe 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -493,7 +493,7 @@ void geometry_information::make_skeletal(hpcshape& sh, ld push) { hyperpoint yzspin(ld alpha, hyperpoint h) { if(gproduct) return product::direct_exp(cspin(1, 2, alpha) * product::inverse_exp(h)); - else if(embedded_plane && geom3::sph_in_low()) { + else if(embedded_plane && moved_center()) { h = gpushxto0(tile_center()) * h; h = cspin(1, 2, alpha) * h; h = rgpushxto0(tile_center()) * h; diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 1d731b60..d193d954 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -387,8 +387,6 @@ EX ld edge_of_triangle_with_angles(ld alpha, ld beta, ld gamma) { } EX hyperpoint hpxy(ld x, ld y) { - if(sl2) return hyperpoint(x, y, 0, sqrt(1+x*x+y*y)); - if(rotspace) return hyperpoint(x, y, 0, sqrt(1-x*x-y*y)); if(embedded_plane) { geom3::light_flip(true); hyperpoint h = hpxy(x, y); @@ -396,6 +394,8 @@ EX hyperpoint hpxy(ld x, ld y) { swapmatrix(h); return h; } + if(sl2) return hyperpoint(x, y, 0, sqrt(1+x*x+y*y)); + if(rotspace) return hyperpoint(x, y, 0, sqrt(1-x*x-y*y)); return PIU(hpxyz(x,y, translatable ? 1 : sphere ? sqrt(1-x*x-y*y) : sqrt(1+x*x+y*y))); }