I recently wondered how I could calculate 4d rotations. I know that matrices and quaternions could be used to do so, but I haven't really found anything clear and specific about what I want.
Basically, I'd like to get from the coordinates of a point $(x,y,z,w)$, to the coordinates of that point, rotated by an angle $θ$, by the desired plane of rotation. ($xy, xz, xw, yz, yw$ or $zw$).
What could be the easiest formula to do so, with matrices and/or quaternions?
Here is a R function performing such a rotation:
Maybe you don't know the R language but I think the syntax is intuitive enough. Tell me if you don't understand and I'll update this answer to translate in maths.