Due: Tuesday 3/31 10:00am
- 4th Period: https://classroom.github.com/a/58ZiHIOb
- 5th Period: https://classroom.github.com/a/lITKCxwU
Background:
Mesh files, both .obj and .stl, can be added to your existing triangle based 3d renderer. Add the following:
- New command:
mesh FILENAMEFILENAMEshould either be anobjor an ASCIIstlfile.- Parse the files correctly, and add the triangles represented in each file to your triangle list.
- You only need to be able to parse vertices/triangles. Both file types have potentially more information, which you can ignore.
- You can find sample mesh files here: https://github.com/mks66/resources, as well as a simple python program to translate binary stl files to ASCII.
Submission Guidelines/Makefile additions:
- All your code should be in the root directory of your repository.
- You should have 3 script files:
script_teapot_objandscript_teapot_stl- A script that correctly displays whatever mesh file you have found.
- Place your mesh files in a directory called mesh_files, that is one directory up from your repository (and thus not committed to github).
- Your makefile should include the following:
- A default target that runs the test script.
- A
teapot-objtarget that displaysteapot.obj. - A
teapot-stltarget that displaysteapot_ascii.stl. - A
custom-meshtarget that displays your custom mesh file. - A
download_meshestarget that will usecurlto download all your meshes. e.g.:curl -o ../mesh_files/teapot.obj https://graphics.stanford.edu/courses/cs148-10-summer/as3/code/as3/teapot.obj