1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-16 11:08:05 +00:00

new embedding: Euclidean cylinder

This commit is contained in:
Zeno Rogue
2023-01-24 15:17:09 +01:00
parent bab78c8179
commit 8744420504
7 changed files with 75 additions and 7 deletions

View File

@@ -3398,6 +3398,12 @@ EX transmatrix map_relative_push(hyperpoint h) {
auto h1 = esl2_ati(h);
return esl2_zpush(h1[2]) * xpush(h1[0]) * ypush(h1[1]);
}
if(geom3::euc_cylinder()) {
ld z0 = hypot(h[1], h[2]);
if(!z0) return Id;
transmatrix T = xpush(h[0]) * cspin(1, 2, atan2(h[1], h[2])) * zpush(z0);
return T;
}
if(geom3::euc_in_sph()) {
ld tx = hypot(h[0], h[2]);
ld ty = hypot(h[1], h[3]);