In this lab, you are required to use geometry representation you learned in lecture to draw a 3D sphere on 2D canvas. Here are some instructions you might need to finish this lab:
- Our sphere points are 3D points, they will be stored in Mesh3D.java's 2D array whose size equal to stacks x slices.
- We then use Mesh3D to get triangle facets of our sphere. Then we decide if we should draw it out by check this facet normal with camera viewing direction.
- Apply orthogonal projection to our triangle facets to map them to 2D canvas.
- Call draw triangle function we implemented in PA1 to draw them out on our Canvas.