1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 23:47:40 +00:00

Five new projections: Poor Man (hyperbolic only), Panini, retroazimuthal: Craig, Hammer, Littrow (retro-Hammer buggy on sphere)

This commit is contained in:
Zeno Rogue
2020-10-08 18:22:28 +02:00
parent 34dc8fcc6e
commit b74509c95a
5 changed files with 99 additions and 6 deletions

View File

@@ -293,6 +293,8 @@ EX bool two_sided_model() {
if(pmodel == mdHyperboloid) return !euclid;
// if(pmodel == mdHemisphere) return true;
if(pmodel == mdDisk) return sphere;
if(pmodel == mdRetroLittrow) return sphere;
if(pmodel == mdRetroHammer) return sphere;
if(pmodel == mdHemisphere) return true;
if(pmodel == mdRotatedHyperboles) return true;
if(pmodel == mdSpiral && pconf.spiral_cone < 360) return true;
@@ -305,6 +307,12 @@ EX int get_side(const hyperpoint& H) {
double horizon = curnorm / pconf.alpha;
return (H[2] <= -horizon) ? -1 : 1;
}
if(pmodel == mdRetroLittrow && sphere) {
return H[2] >= 0 ? 1 : -1;
}
if(pmodel == mdRetroHammer && sphere) {
return H[2] >= 0 ? 1 : -1;
}
if(pmodel == mdRotatedHyperboles)
return H[1] > 0 ? -1 : 1;
if(pmodel == mdHyperboloid && hyperbolic)