Asg 2: Rotating, Translating, Texture-mapped Quad

Objectives

Implement a program to render a 2D texture-mapped quad that rotates in place and translates.

Assignment

  1. Make sure the quad rotates in place, i.e., rotates about its center. This means you will need to compute the object's centroid or average of all of its vertices.
  2. Additionally, implement object translation such that the quad translates in any pattern you like around the screen (could be circular, could be bouncing off the window borders, could be moving with the mouse cursor, etc.). You will need to make sure that the order of tranformations is how they were presented, reading them from right-to-left.

Suggestions

  1. You could store the object's object center point in a vec3 oc variable.

Input

  1. It would be nice if you could store the quad object vertices (and texture coordinates) in a file.
  2. You will need to read in both vertex and fragment shaders from files, e.g., passthru.vert and passthru.frag.
  3. Make sure to include an image file your program is to read as the texture (you could use our ppm_t class for *.ppm images of the stb class from the learnopengl tutorial.

Output

  1. The quad should be texture-mapped with correct rotations and tranlsations.

Supplemental

  1. Provide a Makefile with a README if there any special program running instructions.

Turn in

Turn in all of your code, in one tar.gz archive of your asg##/ directory, including:
  1. A README file containing
    1. Course id--section no
    2. Name
    3. Brief solution description (e.g., program design, description of algorithm, etc., however appropriate).
    4. Lessons learned, identified interesting features of your program
    5. Any special usage instructions
  2. Makefile
  3. source code (.h headers and .cpp source)
  4. object code (do a make clean before tar)

How to hand in

See handin notes

Grading scheme