The file grjava2e.zip contains the source code listed in: Ammeraal, L. and K. Zhang (2007). Computer Graphics for Java Programmers, 2nd Edition, Chichester: John Wiley. After expanding the file grjava2e.zip, you will obtain a large number of .java files, which are not all complete programs. You can compile and run the following programs; they are all applications, not applets, and they may require other files, which are also given. All these files will be in the same directory. Chapter 1 Elementary Concepts: RedRect.java The largest possible rectangle in red Triangles.java 50 triangles inside each other Anisotr.java The anisotropic mapping mode Isotrop.java The isotropic mapping mode DefPoly.java Drawing a polygon interactively ManySq.java A chessboard of square patterns (Exercise 1.2) Chapter 2 Applied Geometry PolyTria.java Drawing a polygon interactively and triangulation Chapter 3 Rotations and Other Transformations Arrow.java Arrow rotated through 120 degrees about origin ArrowPt.java Arrow rotated through 30 degrees about arbitrary point Rota3DTest.java Rotating a cube (demo of the useful class Rota3D) Chapter 4 Some Classic Algorithms ClipLine.java Cohen-Sutherland line clipping ClipPoly.java Drawing and clipping a polygon Bezier.java Bezier curve segments Bspline.java B-spline curve fitting Bresenham.java Bresenham algorithms for lines and circles (Exercise 4.6) Chapter 5 Perspective CubePers.java A cube in perspective Wireframe.java A general program for wire-frame models Anim.java Animation with double buffering (Exercise 5.4) CubRot2.java Two rotating cubes with double buffering (Exercise 5.5) Chapter 6 Hidden-line Elimination (see also Appendix E) Cylinder.java A (possibly hollow) cylinder HLines.java Hidden-line algorithm BookView.java An open book (Exercise 6.5) Chapter 7 Hidden-face Elimination (see also Appendix E) Backface.java A cube in perspective with back-face culling Painter.java Painter's algorithm ZBuf.java Z-buffer algorithm Chapter 8 Fractals Koch.java Koch curves FractalGrammars.java Fractals based on string grammars, such as trees MandelbrotZoom.java Mandelbrot set, cropping and zooming in. Appendix E Some Applications (generating input files for HLines.java, Painter.java and ZBuf.java of Chapters 6 and 7) Rota3DTetra.java Rotating a tetrahedron IcoDode.java An icosahedron and a dodecahedron SphTria.java A sphere approximated by triangles Torus.java A torus Beams.java Beams in a spiral Func.java Functions z = f(x, y)