|
Rendering Cylinders and Cubes as triangle strips
Cylinder as parametric surface
Cube as parametric surface Use the same approach to computing v that you used for the cylinder, but compute u as follows, with nu = 8:
POSITION NORMAL
u = 0 1 1 0 1 0 0
u = 1/8 1 1 0 0 1 0
u = 2/8 -1 1 0 0 1 0
u = 3/8 -1 1 0 -1 0 0
u = 4/8 -1 -1 0 -1 0 0
u = 5/8 -1 -1 0 0 -1 0
u = 6/8 1 -1 0 0 -1 0
u = 7/8 1 -1 0 1 0 0
u = 8 1 1 0 1 0 0
Homework, due before class on Tuesday March 27 Implement parametric cylinders and cubes. Create one or more example scenes that incorporate spheres, cylinders and cubes as primitives. Note that by non-uniform scaling, you can convert cylinders into rods, and cubes into general boxes.
|