Starting from:

$30

CS680- Assignment 02: 3D Modeling & Transformations Solved

This programming assignrnent is meant to acquaint you with 3D modeling and model transformation. You will implement a creature model and make it move by performing transformations on its joints. 
You will also need to submit a Simple reference image or conceptdrawing with your code. 
Basic Requirements 
Before coding, please have a look at file 



I): we recommend calling functions in mponent class in your keyboard event functions to make the jol body of your creature. p lease be patie At p no have a 100 what the Co mpong 
-o 
c ass provides to make your creature move during running the 



-6 
program. 



After read'ng the code in the "Component.py" file, you should startimplementing certain features in certain blocks/fles in the skeleton 



TODO I in "DisplayableCube.py": please irnplermnt your own geometric object classes that later its instances add up to beyour creatures. In addition to the cube class wre provide you, you could also consider building the geometric object with CLU functions: Cvlinder , Cone(no caps), Sphere, Please create another .py file to write your needed geometric object
classes other than cube. 



TODO 2 in "ModelLinkage.py": please implement your ovm creature class by mimicking the form of the ModelLinkage class. You will need to create a few instances of what'd been defined in TODO I and connected them as a whole. Use them to construct a 3D •nsect, spider, or scorpion model from cyl'nders and/or ellipsoids. The model need not be anatomically accurate, but each limb should have at least three joints. You can the body as a single ellipsoid. You-o through chaining transformation. Remember to modularize your design to one class (g;klike Arm_java in

example code), you might need to reuse them in next programming assignment _ 

3_ TODO 3 in "Sketch_py": After building your body and limb classes, need to create the instances of them in Sketch. py -> method. 

4_ TODO 4 in "Sketch_py" or "ModelLinkage_py": Set up the joint behaviors of your creature after finishing 

TODO Please refer to TOREAD I to see what functions are alreadb' available to you. Limit the angles at each joint within reasonable ranges so that creature's legs, neck, head and any other parts don't intersect or bend in unnatural ways! The orientation of joint rotations for the left and right limbs should mirror each other. Gimbal lock should be avoided. 

5_ TODO 5 in "Sketch_py": Set up the keyboard events which could make your creature act. Please also add a multi-select feature to the interface, so you can control several joints at the same time. Also please set up 5 different poses for your creatures as test cases. After that, please check your keyboard events and test cases to see if they work as expected and satisfy our requirements. 

6_ TODO 6 in "Sketch_py": Implement an eye that always looksat the position of the mouse when no rotation of the camera is performed. An eye should consists of movable pupil and still sclera. 

Extra Credits 

7 _ BONUSI in "DisplayCube_pv": Implement the binds texture images to your geometric objects. 

8_ BONUS2 in "Sketch_py": Use quaternion to implement 

Programming Style 

g. For any modified or newly added source file, pu should include a brief explanation about what you did in this file in the file heading and add Vour name to the author list. Your code should be readable with sufficient comments. You should use consistent variable naming and keep reasonable indentation. In python, we prefer to use restructuredText format docstring, for more details about this format, please 

check here.

Model Requirements
In addition to roughly following the reference image/drawing you will provide, your model should be suitably complex:

at least 6 limbs required (tails and wings count)
each limb must have at least 3 joints
at least two colors should be used
at least two shape types must be used
a pair of opposing limbs must be present (to test mirrored motions)
2. Resources
2.1 Start code
A Python Program skeleton PA2.zip, which includes basic classes, methods, and main pipeline, is provided for you. You are expected to complete the sketch program by completing/modifying Sketch.py. There are comments in the skeleton code that will help guide you in writing your own subroutines. Some of them are noted as "TODO" or "BONUS" which suggest you should complete the corresponding block.

2.2 Environment Setup
Installing the appropriate programming environment should be covered in a lab session. For more step-by-step instructions, please check the environment setup page.

2.3 User Interface
The user interface to the program is provided through mouse buttons and keyboard keys:

ENTER/RETURN: Cycle through components
LEFT-ARROW, RIGHT-ARROW: Iterate through different rotation axis for the currently selected component
UP-ARROW, mouse SCROLL-UP: Increase selected component's rotation angle along the selected axis
DOWN-ARROW, mouse SCROLL-DOWN: Decrease
selected component's rotation angle along the selected axis

mouse Left-Drag: change the viewing angle
r: reset the viewing angle
R: reset everything in the scene
After modifications, your interface may be different from the example program provided here. Don't forget to add a multi-select feature so multiple joints can be changed simultaneously.

2.4 Demo
We prepare a demo video for you. Even though the "creature" in the video doesn't fully satisfy our requirements, this is still good to show how the multi-select works and what will be like if you set the rotation limit correctly.

                                                                   0:00 / 2:38

More products