Clifford torus embedding (needs to be configured manually and on a straight square for now)

This commit is contained in:
Zeno Rogue committed 2023-01-04 23:30:36 +01:00
1 parent bc96b7fba9
commit 32546cee4a
4 files changed
+59 -6

No files matched your search

+12 -2
View File
@@ -1080,7 +1080,7 @@ EX namespace geom3 {
seProduct,
seNil,
seSol, seNIH, seSolN,
seNIH_inv
seCliffordTorus
};
#endif
@@ -1094,6 +1094,7 @@ EX namespace geom3 {
{"Sol", "Embed into Sol. Works only with Euclidean. You need to set the variation to Pure."},
{"stretched hyperbolic", "Embed into stretched hyperbolic geometry. Works only with Euclidean. You need to set the variation to Pure."},
{"stretched Sol", "Embed into stretched Sol geometry. Works only with Euclidean. You need to set the variation to Pure."},
{"Clifford Torus", "Embed Euclidean torus into S3. You need to set the variation to Pure."},
};
EX eSpatialEmbedding spatial_embedding = seDefault;
@@ -1132,13 +1133,17 @@ EX namespace geom3 {
}
EX bool euc_in_noniso() {
return among(ggclass(), gcNil, gcSol, gcNIH, gcSolN) && mgclass() == gcEuclid;
return among(ggclass(), gcNil, gcSol, gcNIH, gcSolN, gcSphere) && mgclass() == gcEuclid;
}
EX bool sph_in_euc() {
return ggclass() == gcEuclid && mgclass() == gcSphere;
}
EX bool euc_in_sph() {
return ggclass() == gcSphere && mgclass() == gcEuclid;
}
EX bool sph_in_hyp() {
return ggclass() == gcHyperbolic && mgclass() == gcSphere;
}
@@ -1220,6 +1225,11 @@ EX namespace geom3 {
g.gameplay_dimension = 2;
}
if(spatial_embedding == seCliffordTorus && ieuclid) {
g = ginf[gCell120].g;
g.gameplay_dimension = 2;
}
bool ieuc_or_binary = ieuclid || (gi.flags & qBINARY);
if(spatial_embedding == seSol && ieuc_or_binary) {