CISC440 S2017 HW1
Due Tuesday, February 28 midnight
Part 1 can only be satisfied with an in-person demonstration to the TA by 6 pm on February 28 (earlier days are fine--TA office hours are recommended)
This assignment is designed to make sure you are ready to compile and run OpenGL 3.3 programs, and to familiarize you with basic GLM functions 2-D and 3-D transformations.
Part 1 [3 points]
- Get OpenGL 3.3, GLFW installed using instructions in OpenGL Tutorial #1 regarding installation on your system
- Run the program, which just pops up an empty (black) window
Part 2 [12 points]
Starting from OpenGL Tutorial #3 (Matrices), you will:
- Create a new 2-D "object/pattern" from multiple (≥ 20) transformed versions of original triangle [2 points] for enough copies, [4 points] for creativity/aesthetics.
- Use at least glm::rotate() and glm::translate() [2 points]
- Use a few (≥ 3) different colors [2 points]
- Create plan view and (approximately) isometric view of your model with different parameters to glm::lookat(). Make the camera close enough that object fills most of window. [2 points]
I am providing an already-modified version of tutorial03.cpp, called modified_tutorial03.cpp, which has a function draw_triangle() that takes as arguments a different model matrix and (r, g, b) color for each triangle to be drawn. (The vertex and fragment shaders have also been modified -- you should not need to go into these). draw_triangle() should NOT be modified for this assignment.
Back up the original .cpp in the directory, drop in the modified .cpp (plus the shaders linked above), and rename it to tutorial03.cpp. Then start modifying it further to satisfy the homework requirements.
When you are done, submit tutorial03.cpp (with your name added in the header section to attest that YOU did the coding) and a screenshot for each view to Sakai. Make sure it is easy to switch between plan view and isometric view in code (commenting out different version of glm::lookat() is fine).
Graduate students only
- Your calls to draw_triangle() cannot be "hard-coded". Rather, you must programmatically create a pattern such as a tiling, a Koch snowflake, or representation of some other 2-D mathematical function
- Your pattern must have ≥ 100 triangles
- You must use shear, scaling, or other kinds of transformations in addition to rotation and translation