JAVA CUBE EXAMPLE


-Clockworks
...Grasshopper Clockwork
...Inertia Clockwork
.........Gear Cutting
.........Sample Gears
.........Rotary Table
.........Parts Disassembled
.........Escapement Revealed
...Simplicity Clockwork
...Gear Machine Clockwork
...Concentricity Clockwork
-Eggs
...Egg Drawing Machine
...Brown Eggs
...Green Eggs
...Fun With Trigonometry
-CNC
...The Milling Machine
...Inside the Controller Case
...Rear of Controller Case
...The Interface Board
-Java Cube
-Java Sphere

The Java Cube is written in the Java language.

It uses a rotation matrix to calculate new vertices for the cube as the mouse moves.

The shading of the cube uses the vector normal of each face compared to a vector between the viewers eye and the center of the cube.

Sides facing away from the viewer are not painted.

Flickering has been eliminated by using double buffering.

DOWNLOAD SOURCE FILES
(cube.zip)

HOLD DOWN YOUR LEFT MOUSE BUTTON
AND MOVE IT AROUND
BELOW