General Notes:
1. All objects are represented by triangular meshes. That is, each rectangle is split
into two triangles.
2. For the four building blocks, I suggest you to write a general function that takes six parameters (the corners of a block): x0, x1, y0, y1, z0, and z1 as its input, and generates the vertices of the triangles and store them into a vertex array.
3. The sphere can be generated using one of the two methods: (a) fan and strip approximation in Section 2.4.3, pages 57 to 58; and (b) recursive subdivision approximation in Section 6.6, pages 297 to 299.
4. All triangles are stored in a single vertex array. The triangles from the same object should be stored consecutively. The order of objects is arbitrary.
5. There should a color array corresponding to the vertex array. You may set any colors. But, different objects should have different colors.
6. You need to adjust the parameters (i.e. left, right, top, bottom) in calling the Frustum( ) function, such that the all objects are in the pictures, and are not too small. This is equivalent to “zooming” the lens virtually.
Get Free Quote!
390 Experts Online