diff --git a/3d-models.cpp b/3d-models.cpp index 0159e6d6..22eb696f 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -492,7 +492,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 && msphere && !sphere) { + else if(embedded_plane && geom3::sph_in_low()) { h = gpushxto0(tile_center()) * h; h = cspin(1, 2, alpha) * h; h = rgpushxto0(tile_center()) * h; diff --git a/geometry.cpp b/geometry.cpp index b74398d4..1f18eac1 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1143,6 +1143,10 @@ EX namespace geom3 { return ggclass() == gcHyperbolic && mgclass() == gcSphere; } + EX bool sph_in_low() { + return mgclass() == gcSphere && among(ggclass(), gcHyperbolic, gcEuclid); + } + EX bool in_product() { return ggclass() == gcProduct; } diff --git a/graph.cpp b/graph.cpp index 573536bb..6ff2927f 100644 --- a/graph.cpp +++ b/graph.cpp @@ -782,7 +782,7 @@ EX shiftmatrix face_the_player(const shiftmatrix V) { return shiftless(cspin90(1, 2) * lrspintox(cspin90(2, 1) * uh) * xpush(hdist0(uh)) * cspin90(0, 2) * spin270()); } #endif - if(embedded_plane && msphere && !sphere && !gproduct) return shiftless(map_relative_push(unshift(V * zpush0(1))) * zpush(-1)); + if(embedded_plane && geom3::sph_in_low()) return shiftless(map_relative_push(unshift(V * zpush0(1))) * zpush(-1)); return rgpushxto0(tC0(V)); }