$25
1. ) Write a Python program that satisfies the following requirements. Draw an object with
PyOpenGL.
1. Draw 3 or more 3D objects.
1. Draw any shape of objects as you want.
2. Each object should be a 3D polygon mesh. It can be drawn using a vertex array
or glVertex3f(). Do not use 2D plannar meshes.
3. You can reuse your class assignment 2 (obj viewer) code if you want to use obj files for this requirement. In this case, an obj file path should be specified by a relative path and the obj files should be included in the submission zip file. Do not use drag and drop to open obj files. They must be automatically loaded when
the program starts.
2. One of the objects should be "main object". The user should be able to transform the main object using the mouse or keyboard.
1. Specifically, the user should be able to use all of the following transformation on
the main object: translate, rotate, shear, scale, and reflect the main object.
2. All these transformations should be performed w.r.t the local frame of the main
object.
3. The rest of the objects should be automatically moved in response to the movement of the main object or other objects around it.
1. Examples: Following the main object, pushed away from the main object to keep
a certain distance from it, "bounced" when "colliding" with the main object, and
so on.
2. Each object must move separately. Do not move them identically so that they
overlap each other.
4. Use perspective projection. The camera should be able to be switched between two modes:
1. First-person view: Attach the camera to the main object just like FPS games. The camera should be translated & rotated along with the main object. (You don't neeed to draw a weapon!)
A.
2. Quarter view: The main object is always the target of the camera. The camera
never rotate, meaning that it always do "panning" when the main object moves.
3.
5. Use OpenGL lighting / shading.
1. Use different material colors for each object.
2. Use 2 or more light sources. Among them, at least one light should be animated.
3. You can use either flat shading or smooth shading for each object.
4. If you use obj files, you can just use the normal vector data in the obj files for
shading.
6. Extra credit
1. Use an animating hierarchical model composed of multiple meshes as an
object, for all objects.
Use curves to express the movement of at least one object