mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-06 11:32:49 +00:00
improved embedded_space diagnostic help text
This commit is contained in:
parent
4351f99432
commit
351ef88df7
36
config.cpp
36
config.cpp
@ -2248,8 +2248,40 @@ EX geom3::eSpatialEmbedding shown_spatial_embedding() {
|
|||||||
EX bool in_tpp() { return pmodel == mdDisk && pconf.camera_angle; }
|
EX bool in_tpp() { return pmodel == mdDisk && pconf.camera_angle; }
|
||||||
|
|
||||||
EX void display_embedded_errors() {
|
EX void display_embedded_errors() {
|
||||||
if(meuclid && among(geom3::spatial_embedding, geom3::seNil, geom3::seSol, geom3::seSolN, geom3::seNIH) && (!among(geometry, gEuclid, gEuclidSquare) || !PURE))
|
using namespace geom3;
|
||||||
dialog::addInfo(XLAT("error: works only in PURE Euclidean regular square or hex tiling"), 0xC00000);
|
if(meuclid && among(spatial_embedding, seNil, seSol, seSolN, seNIH, seProductH, seProductS, seCliffordTorus, seSL2) && (!among(geometry, gEuclid, gEuclidSquare) || !PURE)) {
|
||||||
|
dialog::addInfo(XLAT("error: currently works only in PURE Euclidean regular square or hex tiling"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mhyperbolic && among(spatial_embedding, seSol, seSolN, seNIH) && !bt::in()) {
|
||||||
|
dialog::addInfo(XLAT("error: currently works only in binary tiling and similar"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(meuclid && spatial_embedding == seCliffordTorus) {
|
||||||
|
rug::clifford_torus ct;
|
||||||
|
ld h = ct.xh | ct.yh;
|
||||||
|
bool err = sqhypot_d(2, ct.xh) < 1e-3 || sqhypot_d(2, ct.yh) < 1e-3 || abs(h) > 1e-3;
|
||||||
|
if(err) {
|
||||||
|
dialog::addInfo(XLAT("error: this method works only in rectangular torus"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(meuclid && spatial_embedding == seProductS) {
|
||||||
|
rug::clifford_torus ct;
|
||||||
|
bool err = sqhypot_d(2, ct.xh) < 1e-3 && sqhypot_d(2, ct.yh) < 1e-3;
|
||||||
|
if(err) {
|
||||||
|
dialog::addInfo(XLAT("error: this method works only in cylinder"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(msphere && !among(spatial_embedding, seNone, seDefault, seLowerCurvature, seMuchLowerCurvature, seProduct, seProductS)) {
|
||||||
|
dialog::addInfo(XLAT("error: this method does not work in spherical geometry"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mhyperbolic && !among(spatial_embedding, seNone, seDefault, seLowerCurvature, seMuchLowerCurvature, seProduct, seProductH, seSol, seSolN, seNIH)) {
|
||||||
|
dialog::addInfo(XLAT("error: this method does not work in hyperbolic geometry"), 0xC00000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void show_spatial_embedding() {
|
EX void show_spatial_embedding() {
|
||||||
|
16
geometry.cpp
16
geometry.cpp
@ -1130,14 +1130,14 @@ EX namespace geom3 {
|
|||||||
{"lower curvature", "Embed as a surface in a space of lower curvature."},
|
{"lower curvature", "Embed as a surface in a space of lower curvature."},
|
||||||
{"much lower curvature", "Embed sphere as a sphere in hyperbolic space."},
|
{"much lower curvature", "Embed sphere as a sphere in hyperbolic space."},
|
||||||
{"product", "Add one extra dimension in the Euclidean way."},
|
{"product", "Add one extra dimension in the Euclidean way."},
|
||||||
{"Nil", "Embed into Nil. Works only with Euclidean. You need to set the variation to Pure."},
|
{"Nil", "Embed Euclidean plane into Nil."},
|
||||||
{"Sol", "Embed into Sol. Works only with Euclidean. You need to set the variation to Pure."},
|
{"Sol", "Embed Euclidean or hyperbolic plane into Sol."},
|
||||||
{"stretched hyperbolic", "Embed into stretched hyperbolic geometry. Works only with Euclidean. You need to set the variation to Pure."},
|
{"stretched hyperbolic", "Embed Euclidean or hyperbolic plane into stretched hyperbolic geometry."},
|
||||||
{"stretched Sol", "Embed into stretched Sol geometry. Works only with Euclidean. You need to set the variation to Pure."},
|
{"stretched Sol", "Embed Euclidean or hyperbolic plane into stretched Sol geometry."},
|
||||||
{"Clifford Torus", "Embed Euclidean torus into S3. You need to set the variation to Pure."},
|
{"Clifford Torus", "Embed Euclidean rectangular torus into S3."},
|
||||||
{"hyperbolic product", "embed Euclidean or hyperbolic plane in the H2xR product space. For E2, set the variation to Pure."},
|
{"hyperbolic product", "Embed Euclidean or hyperbolic plane in the H2xR product space."},
|
||||||
{"spherical product", "embed Euclidean or spherical plane in the H2xR product space. For E2, set the variation to Pure."},
|
{"spherical product", "Embed Euclidean cylinder or spherical plane in the H2xR product space."},
|
||||||
{"SL(2,R)", "Embed Euclidean plane in twisted product geometry. Set the variation to Pure."}
|
{"SL(2,R)", "Embed Euclidean plane in twisted product geometry."}
|
||||||
};
|
};
|
||||||
|
|
||||||
EX eSpatialEmbedding spatial_embedding = seDefault;
|
EX eSpatialEmbedding spatial_embedding = seDefault;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user