Each 4D vertex {x,y,z,w} is stereographically projected to 3D using the perspective division:
Where d is the stereographic radius (W-distance slider) and s is the projection scale factor.
In 4-dimensional space, rotation occurs in bivector planes, not around axes. There are C(4,2) = 6 such planes:
Rotations in the XW, YW, ZW planes involve the 4th dimension W and produce the characteristic "folding" of the tesseract invisible to 3D observers.
Edge colors are mapped from the projected W-coordinate of each vertex — primary color at w=+1 (near projection eye) to secondary color at w=−1 (far).