mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
horocyclic coordinates model
This commit is contained in:
parent
97c9673b30
commit
416ee95aac
@ -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}
|
||||
};
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
19
hypgraph.cpp
19
hypgraph.cpp
@ -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) {
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user