NOhs / mgen

Convenient matrix generation functions for python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nD rotation around axis

GPMueller opened this issue · comments

I don't know the application, but it could also be useful to generalize the function rotation_around_axis to nD.

Maybe there is a cleverer way, but it would be at least possible by creating two orthogonal vectors to a given axis and using the existing rotation_from_angle_and_plane with those vectors.

Also a side note:
in the docs in

(3D) Give an angle and a base axis around which to rotate (x, y, z)

I would call it "euclidean coordinate axis" or simply "euclidean axis"

commented

This doesn't work because for example in 4D you do not have a 2D plane that is orthogonal to e.g. (1, 0, 0, 0) but an entire 3d space spanned by (0, 1, 0, 0), (0, 0, 1, 0) and (0, 0, 0, 1). But your comment on the formulation in the documentation is valid.

commented

Or rather "cartesian coordinate axis"

commented

I fixed the wording with 49ac802. I will close this issue. If you find a meaningful way to create a nD rotation around an axis, feel free to reopen this issue.

Yes "cartesian coordinate axis" is clearer.

It makes sense that a generalized, i.e. nD rotation would be defined as a rotation in the plane of two vectors, I did not consider this.