Yesterday jDonut 0.0.3 has been released with a fixed gradient, and, better yet, way better performance, and all still under 100KB, source and class files (not including vecmath).
However, today, after searching a while I found OpenMali, an open source implementation of vecmath (along with other stuff). The new release is larger because I only stripped certain files from it, and the source is all there. It's basically the same as 0.0.3. Next release I might hyper accelerate OpenMali the same way I did with jDonut, with lots of temporary variables.
This time vecmath (and readmes and licenses) were included, and all bugs are accounted for. Happy hacking!
You need the Java3d vecmath.jar for it to work...Sorry if I caused any pain. From now on, the demos com packed with the vecmath.jar.
Also, because of that insidious bug, jDonut is switching to ray tracing.
After vigorous testing, I have found a few bugs:
(1) With the animation method used in the demo, the method lookAt is used too much times while the AWT is merging together repaint messages (yes, use paintImmediately), causing renewRotation to be called excessively and unnecessarily, bogging down performance, and making some of the images look strange on older computers. A fix is possible with synchronized boolean(s).... read more