summaary
This is a webpage that visualize a 4D hypercube.
The hypercude is projected into 3D space, then projected onto your screen.
This project uses webGL. It might use a lot of CPU resources.
operation
Drag with mouse left button to rotate your camera.
Use AD WS QE to rotate in 3D.
Use JL IK UO to rotate in 4D.
general knowledge
I think it is more appropriate to say "rotate inside plane" instead of "rotate around axis".
In 1D world, we have no rotation.
In 2D world, we only have 1 rotation.
if you rotate point P(x,y) inside xy plane by Θ, the new point P'(x',y') is:
x' = xcosΘ + ysinΘ
y' = ycosΘ - xsinΘ
(The +- sign is not important. If you rotate in opposite direction, then the Θ is changed to -Θ, then the sign swapped.)
In 3D world, we have 3 rotations.
if you rotate point P(x,y,z) inside xy plane by Θ, the new point P'(x',y',z') is:
x' = xcosΘ + ysinΘ
y' = ycosΘ - xsinΘ
z' = z
if you rotate point P(x,y,z) inside xz plane by Θ, the new point P'(x',y',z') is:
x' = xcosΘ + zsinΘ
y' = y
z' = zcosΘ - xsinΘ
if you rotate point P(x,y,z) inside yz plane by Θ, the new point P'(x',y',z') is:
x' = x
y' = ycosΘ + zsinΘ
z' = zcosΘ - ysinΘ
In 4D world, we have 6 rotations.
if you rotate point P(x,y,z,w) inside xy plane by Θ, the new point P'(x',y',z',w') is:
x' = xcosΘ + ysinΘ
y' = ycosΘ - xsinΘ
z' = z
w' = w
if you rotate point P(x,y,z,w) inside xz plane by Θ, the new point P'(x',y',z',w') is:
x' = xcosΘ + zsinΘ
y' = y
z' = zcosΘ - xsinΘ
w' = w
if you rotate point P(x,y,z,w) inside yz plane by Θ, the new point P'(x',y',z',w') is:
x' = x
y' = ycosΘ + zsinΘ
z' = zcosΘ - ysinΘ
w' = w
if you rotate point P(x,y,z,w) inside xw plane by Θ, the new point P'(x',y',z',w') is:
x' = xcosΘ + wsinΘ
y' = y
z' = z
w' = wcosΘ - xsinΘ
if you rotate point P(x,y,z,w) inside yw plane by Θ, the new point P'(x',y',z',w') is:
x' = x
y' = ycosΘ + wsinΘ
z' = z
w' = wcosΘ - ysinΘ
if you rotate point P(x,y,z,w) inside zw plane by Θ, the new point P'(x',y',z',w') is:
x' = x
y' = y
z' = zcosΘ + wsinΘ
w' = wcosΘ - zsinΘ
Following this regularity, you can find the number of rotations is the number of ways you can pair these axis.
Clearly, it is n(n-1)/2.