diff --git a/graph.cpp b/graph.cpp index 834e9cfd..392e16de 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5098,6 +5098,9 @@ EX void make_actual_view() { current_display->radar_transform = R * zpush(z); } + else if(geom3::euc_in_sph()) { + current_display->radar_transform = inverse(View); + } else { transmatrix T = actual_view_transform * View; transmatrix U = view_inverse(T); diff --git a/hypgraph.cpp b/hypgraph.cpp index a105c2c2..08b031e4 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1910,7 +1910,7 @@ EX hyperpoint vertical_vector() { } if(embedded_plane && geom3::same_in_same()) return get_view_orientation() * lztangent(vid.wall_height); - if(geom3::euc_in_sl2()) { + if(geom3::euc_in_sl2() || geom3::euc_in_sph()) { transmatrix Rot = View * map_relative_push(inverse(View) * C0); return Rot * lztangent(vid.wall_height); } diff --git a/radar.cpp b/radar.cpp index 1ea586b3..4292b6a7 100644 --- a/radar.cpp +++ b/radar.cpp @@ -54,6 +54,28 @@ pair makeradar(shiftpoint h) { if(d > vid.radarrange) return {false, h1}; if(d) h1 = h1 * (d / (vid.radarrange + cgi.scalefactor/4) / hypot_d(3, h1)); } + else if(geom3::euc_in_sph()) { + h1[0] = atan2(h.h[0], h.h[2]); + h1[1] = atan2(h.h[1], h.h[3]); + h1[2] = 0; + h1 = cgi.intermediate_to_logical * h1; + d = hypot_d(2, h1); + if(d > vid.radarrange) return {false, h1}; + if(d) h1 = h1 / (vid.radarrange + cgi.scalefactor/4); + } + else if(geom3::euc_in_product()) { + if(in_h2xe()) + h1[0] = atanh(h.h[0] / h.h[2]); + else + h1[0] = atan2(h.h[2], h.h[0]); + h1[2] = - zlevel(h.h) - h.shift; + h1[1] = 0; + h1[3] = 0; + h1 = cgi.intermediate_to_logical * h1; + d = hypot_d(2, h1); + if(d > vid.radarrange) return {false, h1}; + if(d) h1 = h1 / (vid.radarrange + cgi.scalefactor/4); + } else { d = hypot_d(2, h1); if(d > vid.radarrange) return {false, h1};