Line-drawing and polygon-filling rasterization algorithms in Java. Simple 2D package and more complex 3D package with Z-buffering. Texture mapping not supported at the moment. Color interpolation for lines, Gouraud shading for polygons fully supported. Floating point vertex coordinates, not integer. Pixel-level aliasing, not endpoint aliasing. Doesn't use Bresenham line style! Works with all Java versions. No external dependencies. Suitable for study in academic institutions, especially as related to line-drawing accuracy. Particular attention to detail concerning chopping of accumulation errors, using a cast from 64 bit to 32 bit strategy, in the interval [1.0,2.0). Individual pixel errors with overlapping polygons or line segments are about one in a billion, but I can't reproduce any errors at the moment by using random number generation with tens of millions of cases. Emphasis not only on correctness, but also on performance for real-world use or hardware implementation.
Features
- Works with all versions of Java, version 1.0 included (1996 era)
- No external library dependencies
- Translates easily to other computer languages
- Correctness first, performance second
- Suitable for academic study
- Extremely modular in design, hierarchical structure
- Operates directly on pixel buffers or on abstract interfaces
- Encapsulates algorithms instead of data (procedural)
- Emphasis on extensibility
- Implements a modern, corrected version of Bresenham line-drawing algorithm (2001)
- Pixel-level aliasing always, endpoint/vertex aliasing never
- Support for CSG rendering frameworks that use Goldfeather-type algorithms
- Capable of parallelizing/tiling complex rendering operations (coming soon)
- Support for multiple CPU core usage, for increased rendering performance (coming soon)
- Support for texture mapping, Phong shading, and custom lighting via U,V interpolated polygon coordinates (coming soon)
License
BSD LicenseFollow grafx - Extensible Java Graphics Package
User Reviews
-
Greate... :)