Free-Form Deformation
Cherry Zhang
David R. Cheriton School of Computer Science
Motivations
- Apply concepts of multi-variate tensor product of Bernstein polynomials from 2D Bézier curve to 3D geometry.
- Develop a simple tool for animating OBJ models.
- Explore the effectiveness of using control points in manipulating models.
Background
- The Free-Form Deformation (FFD) used in this project was introduced by Sederberg and Parry [1]. In FFD, a geometric model is enclosed within a parallelepiped lattice of control points. The parallelepiped lattice is called the control polygon. The control polygon defines a local coordinate system. Any point on the geometric model has world coordinates of (x,y,z) also has local coordinates of (s,t,u). When the control points are displaced, the local coordinates of the model are re-evaluated using tensor product of trivariate Bernstein polynomials. The local coordinates are then converted to world coordinates. This technique provides an indirect yet effective way to deform geometric models.
User Interface
- Feature 0: Model Transformations
The model can be translated and rotated along all x- ,y- and z-axis. It can also be scaled.
- Feature 1: Mode Switching
The application supports two modes: model transformation and control point manipulation. In both modes, model can be transformed. However in control point manipulation mode, control points can also be selected and transformed.
- Feature 2: Show/Hide Control Points/Axes
Control points and axes can be hidden after model manipulation.
- Feature 3: Select/Deselect Multiple Control Points
- x,y,z-axis: automatically select all the control points that are along the same x,y or z-axis as the selected control point.
- x,y,z-plane: automatically select all the control points that are on the same x,y or z-plane as the selected control points.
- deselect all: deselect all control points.
- Feature 4: Bend X/Y/Z
Only one bend operation can be selected at a time. Slider is used to control the degree of bending.
- Feature 5: Double Twist X/Y/Z
Control points are twisted in opposite directions about the center plane of the control polygon. Slider is used to control the degree of twisting.
- Feature 6: Single Twist X/Y/Z
Control points are twisted in the same direction about one side plane of the control polygon. Slider is used to control the degree of twisting
- Feature 7: Reset Control Points and Transformations
Reset model orientation and/or control point positions.
- Feature 8: Dynamic Manual and Mode Display
A message box is implemented to dynamically provide users with instructions.
- Feature 9: Adjustable Number of Control Points
Users are given the freedom to adjust the number of control points along each axis. The minimum number of control points is 1 and maximum is 10.
Implementation Details
Figure 1: Control polygon and local coordinate system
Extras
- Extra 0: Multiple Control Point Selection
Support for multiple control point selection is implemented because sometimes it is too slow to move one control point at a time. Also, chaning a single control point may not have a significant effect on the model.
- Extra 1: Separation of Single and Double Twist
The double twist operation was implemented based on the algorithms specified in [2]. Single twist was implemented by changing the "zero-rotation" plane in double twist from center of the control polygon to one side of the control polygon.
- Extra 2: Open OBJ models From File
This extra feature allows user to load their own models.
- Extra 3: User Control of Number of Control Points
This feature was implemented for studying the effects of control point movement on models. The details of the study is in Discussions
- Extra 4: Creation of Demo Videos
A few demo clips were created to show the features of the application.
What I Have Learned
- Knowledge 0: Import OBJ and MTL files to FLTK/OpenGL application. (Objective 1)
- Knowledge 1: How to Implement algorithms to evaluate tensor product of trivariate Bernstein Polynomials. (Objective 5)
- Knowledge 2: Efficiently convert models from world-coordinate system to local-coordinate system and vice versa. (Objective 2)
- Knowledge 3: Implement various UI features using FLTK (Objective 0)
- Knowledge 4: How to define and simulate Bend and Twist operations on control polygons. (Objective 6,7,8)
- Knowledge 5: The difficulties in implementing direct manipulation features. (Discussions)
- Knowledge 6: The effects of global control points and the number of global points on the model. (Objective 9 and Discussions)
Results/Demos
This text will be replaced