horocyclic coordinates model

This commit is contained in:
Zeno Rogue 2019-11-09 12:49:00 +01:00
parent 97c9673b30
commit 416ee95aac
4 changed files with 25 additions and 6 deletions

View File

@ -633,6 +633,7 @@ vector<modelinfo> mdinf = {
{X3("Mollweide"), mf::euc_boring | mf::pseudoband | mf::equiarea },
{X3("central cylindrical"), mf::euc_boring | mf::band },
{X3("Collignon"), mf::pseudoband | mf::equiarea },
{X3("horocyclic coordinates"), mf::euc_boring },
{X3("guard"), 0},
{X3("polynomial"), mf::conformal}
};

View File

@ -312,8 +312,8 @@ enum eModel {
// 20..24
mdEquivolume, mdCentralInversion, mdSimulatedPerspective, mdTwoHybrid, mdGeodesic,
// 25
mdMollweide, mdCentralCyl, mdCollignon,
// 26..
mdMollweide, mdCentralCyl, mdCollignon, mdHorocyclic,
// 29..
mdGUARD, mdPixel, mdHyperboloidFlat, mdPolynomial, mdManual
};

View File

@ -444,6 +444,25 @@ EX void applymodel(hyperpoint H, hyperpoint& ret) {
break;
}
case mdHorocyclic: {
find_zlev(H);
models::apply_orientation_yz(H[1], H[2]);
models::apply_orientation(H[0], H[1]);
ret = hyperbolic ? deparabolic10(H) : H;
ret *= .5;
ret[LDIM] = 1;
models::apply_orientation(ret[1], ret[0]);
models::apply_orientation_yz(ret[2], ret[1]);
if(nonisotropic) ret = lp_apply(ret);
break;
}
case mdHemisphere: {
switch(cgclass) {

View File

@ -200,7 +200,7 @@ EX namespace models {
EX bool model_available(eModel pm) {
if(prod) return pm == mdPerspective;
if(sl2) return pm == mdGeodesic;
if(nonisotropic) return among(pm, mdDisk, mdPerspective, mdHyperboloid, mdGeodesic, mdEquidistant, mdFisheye);
if(nonisotropic) return among(pm, mdDisk, mdPerspective, mdHorocyclic, mdGeodesic, mdEquidistant, mdFisheye);
if(pm == mdGeodesic && !sol) return false;
if(sphere && (pm == mdHalfplane || pm == mdBall))
return false;
@ -213,7 +213,7 @@ EX namespace models {
EX bool model_has_orientation() {
return
among(pmodel, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid) || mdBandAny();
among(pmodel, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid, mdHorocyclic) || mdBandAny();
}
EX bool model_has_transition() {
@ -226,10 +226,9 @@ EX namespace models {
if(m == mdDisk && GDIM == 3 && (hyperbolic || nonisotropic)) return XLAT("ball model/Gans");
if(m == mdPerspective && prod) return XLAT("native perspective");
if(nonisotropic) {
if(m == mdHyperboloid) return XLAT("simple model: projection");
if(m == mdPerspective) return XLAT("simple model: perspective");
if(m == mdGeodesic) return XLAT("native perspective");
if(m == mdEquidistant || m == mdFisheye) return XLAT(mdinf[m].name_hyperbolic);
if(among(m, mdEquidistant, mdFisheye, mdHorocyclic)) return XLAT(mdinf[m].name_hyperbolic);
}
if(m == mdDisk && GDIM == 3) return XLAT("perspective in 4D");
if(m == mdHalfplane && GDIM == 3 && hyperbolic) return XLAT("half-space");