diff --git a/graph.cpp b/graph.cpp index de0b6096..25a21cdb 100644 --- a/graph.cpp +++ b/graph.cpp @@ -6030,7 +6030,8 @@ void calcparam() { if(current_display->sidescreen) cd->xcenter = vid.yres/2; } - cd->radius = vid.scale * cd->scrsize; + cd->radius = vid.scale * cd->scrsize; + if(DIM == 3) cd->radius = cd->scrsize; realradius = min(realradius, cd->radius); if(dronemode) { cd->ycenter -= cd->radius; cd->ycenter += vid.fsize/2; cd->ycenter += vid.fsize/2; cd->radius *= 2; } diff --git a/hypgraph.cpp b/hypgraph.cpp index 7b70cd50..582311f7 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -234,8 +234,9 @@ hyperpoint mobius(hyperpoint h, ld angle, ld scale = 1) { void applymodel(hyperpoint H, hyperpoint& ret) { if(DIM == 3) { - ret[0] = H[0]/H[2]; - ret[1] = H[1]/H[2]; + ld ratio = vid.xres / current_display->tanfov / current_display->radius / 2; + ret[0] = H[0]/H[2] * ratio; + ret[1] = H[1]/H[2] * ratio; ret[2] = 1; return; }