mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-19 07:20:25 +00:00
nisot:: azimuthal equidistant projection
This commit is contained in:
parent
d1b366a1f9
commit
43bcc4e2bd
@ -708,6 +708,12 @@ EX void applymodel(hyperpoint H, hyperpoint& ret) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case mdEquidistant: case mdEquiarea: case mdEquivolume: {
|
case mdEquidistant: case mdEquiarea: case mdEquivolume: {
|
||||||
|
if(nonisotropic) {
|
||||||
|
H = nisot::inverse_exp(H, nisot::iTable, false);
|
||||||
|
if(nisot::local_perspective_used()) H = nisot::local_perspective * H;
|
||||||
|
ret = H; ret[3] = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
ld zlev = find_zlev(H);
|
ld zlev = find_zlev(H);
|
||||||
|
|
||||||
ld rad = hypot_d(DIM, H);
|
ld rad = hypot_d(DIM, H);
|
||||||
|
@ -197,7 +197,7 @@ EX namespace models {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EX bool model_available(eModel pm) {
|
EX bool model_available(eModel pm) {
|
||||||
if(nonisotropic) return among(pm, mdDisk, mdPerspective, mdGeodesic);
|
if(nonisotropic) return among(pm, mdDisk, mdPerspective, mdGeodesic, mdEquidistant);
|
||||||
if(pm == mdGeodesic && !sol) return false;
|
if(pm == mdGeodesic && !sol) return false;
|
||||||
if(sphere && (pm == mdHalfplane || pm == mdBall))
|
if(sphere && (pm == mdHalfplane || pm == mdBall))
|
||||||
return false;
|
return false;
|
||||||
@ -225,6 +225,7 @@ EX namespace models {
|
|||||||
if(m == mdDisk) return XLAT("simple model: projection");
|
if(m == mdDisk) return XLAT("simple model: projection");
|
||||||
if(m == mdPerspective) return XLAT("simple model: perspective");
|
if(m == mdPerspective) return XLAT("simple model: perspective");
|
||||||
if(m == mdGeodesic) return XLAT("native perspective");
|
if(m == mdGeodesic) return XLAT("native perspective");
|
||||||
|
if(m == mdEquidistant) return XLAT(mdinf[m].name_hyperbolic);
|
||||||
}
|
}
|
||||||
if(m == mdDisk && DIM == 3) return XLAT("perspective in 4D");
|
if(m == mdDisk && DIM == 3) return XLAT("perspective in 4D");
|
||||||
if(m == mdHalfplane && DIM == 3 && hyperbolic) return XLAT("half-space");
|
if(m == mdHalfplane && DIM == 3 && hyperbolic) return XLAT("half-space");
|
||||||
|
Loading…
Reference in New Issue
Block a user