Courses‎ > ‎Computer Graphics‎ > ‎Dyrland-Weaver‎ > ‎Work‎ > ‎

Work 11: More Delightful Labor

posted May 12, 2018, 7:03 PM by JonAlf Dyrland-Weaver   [ updated May 14, 2018, 8:00 AM ]
(MDL actually stands for Motion Description Language)

Before doing anything else, take a look at MDL.spec, it provides important information about the language structure.

There are many commands and features in MDL that we will not be using yet, you should ignore those for now.

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
    • do not try to use the option arguments for these commands
  • 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 
    • do not try to use the option arguments for these commands
  • line
    • add a line to a temporary edge matrix, multiply it by the current top and draw it to the screen
    • do not try to use the option arguments for this command
  • save
    • save the screen to the provided file name
  • display
    • show the image
  • You only need to modify one of the following files (c/python):
    • my_main.c 
    • mdl.y: there is a comment at the very bottom that you will also need to check.
    • script.py
github clone links:
http: https://github.com/mks66/mdl.git
Comments