3D Engine

Click here to view this example

the source (zip file) test3DPanel.java is the one to mess with if you want to change the objects around

This is my second try at making a descent 3D engine in Java. It is fairly usable code-wise for anyone trying to do things in 3D, but it still could be much better. It includes the nice feature of having the objects free-spin after you rotate them with the mouse.

There is something wrong with the Z Sorting algorithm. It sorts the 3D polygons using the Z of the average point (calculated by averaging all of the corner points of the polygon) It seems like this should work ok but in certain situations it doesn't. Please email me if you have any suggestions for this.