Work 9: More Delightful Labor

posted May 2, 2017, 6:51 AM by JonAlf Dyrland-Weaver   [ updated May 8, 2017, 7:49 AM ]
DUE 8am TUESDAY (5/9) MORNING

Time to start working on mdl! Implement the following mdl commands:
  • push
    • push a copy of the current top of the origins stack onto the origins stack (a full copy, not just a reference to the current top)
  • pop
    • removes the top of the origins stack (nothing needs to be done with this data)
  • move/rotate/scale
    • create a translation/rotation/scale matrix and multiply the current top by it
  • box/sphere/torus
    • add a box/sphere/torus to a temporary polygon matrix, multiply it by the current top and draw it to the screen 
  • line
    • add a line to a temporary edge matrix, multiply it by the current top and draw it to the screen
  • save
    • save the screen with the provided file name
  • display
    • show the image
Notes:
  • You only need to modify one of the following files (c/python):
    • my_main.c 
    • script.py
  • Look through the foreign files included with mdl, specifically MDL.spec, it provides a description of the language
github clone links:
http: https://github.com/mks66/mdl.git
Comments