This Java applet illustrates a three dimensional graphics
example: a rotating wireframe cube. There are
four classes that are used. Here is the source
code for the classes:
-
This class represents a point in three dimensional space: xyzpoint.java
-
This class represents a line connecting two points in three dimensional space: xyzline.java
-
This class represents a wireframe object as an array of xyzline objects: wirefr.java
-
Display a rotating wireframe cube: cube.java
Click here to view the applet in motion
(adapted from
Java Programming the Easy Way