1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-27 18:39:43 +00:00

new pmodel: Central Inversion (for Euclidean)

This commit is contained in:
Zeno Rogue
2019-07-03 04:53:56 +02:00
parent 15a9b6135b
commit fc43a4716b
5 changed files with 15 additions and 2 deletions

View File

@@ -309,6 +309,15 @@ void applymodel(hyperpoint H, hyperpoint& ret) {
return;
}
case mdCentralInversion: {
ld tz = get_tz(H);
for(int d=0; d<DIM; d++) ret[d] = H[d] / tz;
ld r = 0;
for(int d=0; d<DIM; d++) r += ret[d]*ret[d];
for(int d=0; d<DIM; d++) ret[d] /= r;
return;
}
case mdHalfplane: {
// Poincare to half-plane