new projection: horocyclic equal-area

This commit is contained in:
Zeno Rogue 2023-03-16 14:42:02 +01:00
parent b8059c0528
commit 2a354786e4
3 changed files with 26 additions and 3 deletions

View File

@ -1014,7 +1014,9 @@ enum eModel : int {
mdWerner, mdAitoff, mdHammer, mdLoximuthal, mdMiller, mdGallStereographic, mdWinkelTripel,
// 39..48
mdPoorMan, mdPanini, mdRetroCraig, mdRetroLittrow, mdRetroHammer, mdThreePoint, mdLiePerspective, mdLieOrthogonal, mdRelPerspective, mdRelOrthogonal,
// 49..
// 49
mdHorocyclicEqa,
// 50..
mdGUARD, mdPixel, mdHyperboloidFlat, mdPolynomial, mdManual
};
#endif
@ -1076,6 +1078,7 @@ EX vector<modelinfo> mdinf = {
{X3("Lie orthogonal"), mf::euc_boring, DEFAULTS},
{X3("relativistic perspective"), mf::euc_boring, DEFAULTS},
{X3("relativistic orthogonal"), mf::euc_boring, DEFAULTS},
{X3("horocyclic equal-area"), mf::euc_boring, DEFAULTS},
{X3("guard"), mf::technical, DEFAULTS},
{X3("pixel"), mf::technical, DEFAULTS},
{X3("hypflat"), mf::technical, DEFAULTS},

View File

@ -780,6 +780,26 @@ EX void apply_other_model(shiftpoint H_orig, hyperpoint& ret, eModel md) {
break;
}
case mdHorocyclicEqa: {
if(hyperbolic) {
models::apply_orientation_yz(H[1], H[2]);
models::apply_orientation(H[0], H[1]);
}
ret = hyperbolic ? deparabolic13(H) : H;
ret[0] = exp(-ret[0]) - 1;
ret *= .5;
ret[LDIM] = 1;
if(hyperbolic) {
models::apply_orientation(ret[1], ret[0]);
models::apply_orientation_yz(ret[2], ret[1]);
}
break;
}
case mdLieOrthogonal: {
ret = lie_log_correct(H_orig, H);

View File

@ -214,11 +214,11 @@ EX namespace models {
}
EX bool has_orientation(eModel m) {
if(among(m, mdHorocyclic, mdLieOrthogonal, mdLiePerspective))
if(among(m, mdHorocyclic, mdHorocyclicEqa, mdLieOrthogonal, mdLiePerspective))
return hyperbolic || in_h2xe();
if(is_perspective(m) && panini_alpha) return true;
return
among(m, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid, mdHorocyclic, mdAxial, mdAntiAxial, mdQuadrant,
among(m, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid, mdHorocyclic, mdHorocyclicEqa, mdAxial, mdAntiAxial, mdQuadrant,
mdWerner, mdAitoff, mdHammer, mdLoximuthal, mdWinkelTripel, mdThreePoint) || mdBandAny();
}