PA 2 Free-form Deformation
There are two parts in this programming assignment
- Part 1 is due on Sept 18 11:59pm (2014), NO LATE SUBMISSION!!
- Part 2 is due on Sept 23 11:59pm (2014).
- Code: cs451-PA2.7z Δ
- How to submit
- email me (jmlien@cs.gmu.edu) and your TA (ple13@masonlive.gmu.edu) a link to all source code in a file named
- cs451_pa2_part1_[your last name].zip for part 1
- cs451_pa2_part2_[your last name].zip for part 2
- Please do not send me the file directly
- email me (jmlien@cs.gmu.edu) and your TA (ple13@masonlive.gmu.edu) a link to all source code in a file named
- Solution
- part 1: cs451-PA2-part1-solution.7z Δ
- part 2: cs451-PA2-part2-solution.7z Δ
Part 1 Bounding lattice (50%)
- Task 1 (10%): render an axis-aligned box B that is 1.2 times larger than the smallest axis-aligned bounding box of the input model
- Task 2 (10%): render an nx by ny by nz lattice by splitting the axis-aligned box B
- nx and ny and nz are user inputs
- You should draw the nodes and the edges of the lattice in different colors, such as red and blue, respectively
- Task 3 (15%): implement a function that allows user to select a node of the lattice
- Task 4 (15%): implement a function that allows user to move the selected node using mouse
- hints
- Use these functions to compute projections
- glGetIntegerv( GL_VIEWPORT, ... );
- glGetDoublev( GL_MODELVIEW_MATRIX, ... );
- glGetDoublev( GL_PROJECTION_MATRIX, ... );
- gluProject()
- Use gluUnProject() when you try to move the selected node around.
- Use these functions to compute projections
Part 2 Free-from deformation (50%)
- Task 1 (25%): represent each vertex as a weighted combination of lattice nodes
- Task 2 (25%): update the coordinates of the vertices after a selected node is moved
- hints
- Demo video
Examples
The following command creates a 3x4x4 lattice around the model 400.obj
> ffd.exe -nx 3 -ny 4 -nz 4 ../models/400.obj
User uses mouse to select a node of the lattice
User uses mouse to move the selected node to a new location (model is not deformed in the image below)
Deformed model using FFD