radar in euc_in_sl2 (not great)

This commit is contained in:
Zeno Rogue 2023-01-08 15:57:51 +01:00
parent 763a932aca
commit faee70ec3e
2 changed files with 10 additions and 1 deletions

View File

@ -5073,7 +5073,10 @@ EX void make_actual_view() {
#endif
#if MAXMDIM >= 4
if(embedded_plane) {
if(nonisotropic) {
if(geom3::euc_in_sl2()) {
current_display->radar_transform = inverse(actual_view_transform * View);
}
else if(nonisotropic) {
transmatrix T = actual_view_transform * View;
ld z = -tC0(view_inverse(T)) [2];
transmatrix R = actual_view_transform;

View File

@ -63,6 +63,12 @@ pair<bool, hyperpoint> makeradar(shiftpoint h) {
if(d > vid.radarrange) return {false, h1};
if(d) h1 = h1 / (vid.radarrange + cgi.scalefactor/4);
}
else if(geom3::euc_in_sl2()) {
h1 = cgi.intermediate_to_logical * esl2_ati(unshift(h)); h1[1] = -h1[1];
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]);