3D Quaternion Rotation Example
Below demonstrates my understanding of quaternion mathematics (hyper-complex numbers based on euler angles). There are absolutely no graphics or animations in this demonstration, and it is 100% my own original work. This version is written in Java for applet convienience.
- Faces and glyphs of the cube are based on the fillPoly method
- 3D vectors converted to 2D graphics methods using the following formulas:
- Quaternion rotation transform is , = < x, y, z >
The source code can be further optimized because for every vector operation heap space is allocated, and transforms are calculated upon every call to paint, which can be cached.
Experimented with 3D graphics development using the DirectX development kit. One such example is wrapping a bitmap around a flexing sphere with lighting: