This Sp1 is due by the end of Thursday, November 3rd, emailed as a jar, as in previous assignments. You've seen the collected critiques for PA3. Pay careful attention to the various successes and failings noted there.
The basic idea:
Build two abutting cones from a collection of independent triangles, with the two vertexes of the cones on the z-axis and the base of each cone in the x,y plane, z=0. Much of the basics are shown in the following three sketches I did in class, and edited later:
The details
And finally: Be proud of your results! This is pretty advanced work for a beginning graphics course with code built from scratch.
Wire frames: Draw only the edges - no ray tracing required.
Constant illumination: Ray trace, but use only one color. Harlequin approach - each triangle a random color.
Empty code and javadoc. Empty method bodies, but with a returned value/object as needed.
Fancy stuff: Other variants could include different colors, two light sources, different ambient level, Two cone objects, especially if they intersect, extreme shapes, e.g. flat bottom.
Concept of convexity: "no (con)cavities" - pool ball is convex. Technically draw any chord from one point on the surface to any other point - it will be entirely in the interior. For a single convex object, ray tracing is not necessary. Only need to do "backface culling" - ignore any triangle, face, facet, whose normal is point away from the view direction.
Go to CSU540 home page. or RPF's Teaching Gateway or homepage