This page demonstrates some applets related to Java applications discussed in Chapter 8 of Computer Graphics for Java Programmers.


Section 8.1. A possibly hollow cylinder
n = number of vertices on each circle
D = diameter of outer circle
d = diameter of inner circle, or 0 is the cylinder is not hollow
The height of the cylinder is 1.
Check or change the values of n, D and d below and click on the OK button.




Section 8.2. Platonic solids: dodecahedron




Section 8.2. Platonic solids: icosahedron




Section 8.3. Sphere representations
A sphere approximated by triangles




Section 8.5. Beams in a spiral
There will be n beams. Each next beam is turned alpha degrees compared with the previous one.
For each beam, height = width = 1, length (not less than 1) can be set below.




Section 8.6. Functions of two variables

In the expression for z = f(x, y), you may use only

In particular, do not use unary minus signs, other than for constants. For example, instead of   -x * y / 5
you should write either   0 - x * y / 5   or simply   -0.2 * x * y  as you can try by using copy and paste.




Exercise 8.5. Two tori
n = number of small circles on each torus
r = radius of center circle of each torus (at least 2)
Each small circle has radius 1.
Check or change the values of n and r below and click on the OK button.