1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-15 14:27:37 +00:00

renamed parallel_transport to shift_object, made it use shift_method, and made it correct for Lie movement

This commit is contained in:
Zeno Rogue
2022-12-17 11:35:28 +01:00
parent e1301e10bd
commit 4da63f57dc
4 changed files with 39 additions and 23 deletions

View File

@@ -2846,10 +2846,16 @@ EX namespace nisot {
EX transmatrix parallel_transport(const transmatrix Position, const hyperpoint direction) {
auto P = Position;
nisot::fixmatrix(P);
if(!geodesic_movement) return eupush(Position * translate(-direction) * inverse(Position) * C0, -1) * Position;
return parallel_transport_bare(P, direction);
}
EX transmatrix lie_transport(const transmatrix Position, const hyperpoint direction) {
transmatrix pshift = eupush( tC0(Position) );
transmatrix irot = iso_inverse(pshift) * Position;
hyperpoint tH = lie_exp(irot * direction);
return pshift * eupush(tH) * irot;
}
EX transmatrix spin_towards(const transmatrix Position, const hyperpoint goal, flagtype prec IS(pNORMAL)) {
hyperpoint at = tC0(Position);