From 6950e0e1bac8f3b67d404906ca81acf53460d471 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 3 Feb 2023 16:11:13 +0100 Subject: [PATCH] embeddings:: fixed vertical_vector --- hypgraph.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/hypgraph.cpp b/hypgraph.cpp index f880c8f4..8275d8ca 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1896,30 +1896,17 @@ EX bool keep_vertical() { EX hyperpoint vertical_vector() { auto& ds = downseek; - if(msphere && !sphere && !gproduct && vid.fixed_yz) { - hyperpoint h = get_view_orientation() * C0; - if(vid.wall_height > 0) h = -h; - return h; - } - if(meuclid && hyperbolic && vid.fixed_yz) { - hyperpoint h = iso_inverse(View) * C0; - return View * (orthogonal_move(h, vid.wall_height) - h); - } - if(gproduct && vid.fixed_yz) { - return get_view_orientation() * lztangent(embedded_plane ? vid.wall_height : 1); - } - if(cgi.emb->is_same_in_same()) - return get_view_orientation() * lztangent(vid.wall_height); - if(cgi.emb->is_euc_in_sl2() || cgi.emb->is_euc_in_sph()) { + if(embedded_plane && vid.fixed_yz) { transmatrix Rot = View * cgi.emb->map_relative_push(inverse(View) * C0); + if(gproduct) Rot = NLP * Rot; return Rot * lztangent(vid.wall_height); } - if(embedded_plane && vid.fixed_yz && nonisotropic) { - return NLP * lztangent(vid.wall_height); + if(gproduct && vid.fixed_yz) { + return get_view_orientation() * lztangent(1); } - else if(ds.qty && gproduct) + if(ds.qty && gproduct) return get_view_orientation() * product::inverse_exp(ds.point); - else if(ds.qty) + if(ds.qty) return ds.point; return C0; }