Courses‎ > ‎Computer Graphics‎ > ‎Konstantinovich‎ > ‎

2019-03-21 06Triangles

posted Mar 21, 2019, 6:21 AM by Konstantinovich Samuel
You must do the following things:
  1. Write correct, functioning code.
  2. Submit code that runs the provided testing script
  3. Upload an original picture to the gallery
The Drawing:
  • Create new functions to add a polygon to a matrix, and go through the matrix 3 points at a time to draw triangles.
    • You should have a new triangle matrix that exists alongside the edge matrix. The edge matrix should be used for the shapes that are exclusively 2d (lines, circles, splines), and the triangle matrix for our 3d shapes.
    • Anything aside from shape drawing that modifies/uses the edge matrix (apply, clear, display, save) should now modify/use the triangle matrix as well.
  • Modify add box, add sphere and add torus to add triangles instead of points.
  • Make sure the parser calls the draw_polygons functions when needed instead of draw_lines
  • More to come...

Repo:  MKS66-Triangles

Basefile including the old assignment's parser can be found in the source repo: