Diane Pederson (dpderso@ucsc.edu)
Animation of flexable object
CMPS 161 W09
Final Project Proposal
Date: 2/3/09
|
Development Platform
- Visual Studio express edition
- g++, openGL, Fluid and FLTK
- Project will be tested on sun machines in lab 105
Project Description
- Create points and connect them with springs using hooks law and damping factor.
- F = -kx where
- k is the spring constant
- Create a solver for physics and collision detection for hitting the floor.
- Implement Newton's second law of physics: F = ma
- Use Euler integration or Runge-Kutta 4th order integration for physics simulation
Add user interaction
- Buttons to apply gravity/anti-gravity
- Buttons to keep object solid/flexable
- Buttons to increase/decrease velocity
- Buttons for camera movement
|
The user interface is designed to be straight forward. All of the controls are
green buttons. The 3 dimensional object will appear in the screen hovering about
halfway up. The initial velocity will be zero therefore there is no movement. Engage the
gravity button to watch the object drop to the floor, squish down and then rebound. After
each rebound about half of the velocity will be lost to ensure the object eventually
stops. The user can also increase or decrease the velocity of the object. These buttons
can have an unusual affect on the object depending on weather it is falling or raising.
Increasing the velocity can quickly send the object into space when it is rebounding.
The Euler equations that are use to calculate the
position and velocity are : vi+1 = vi + a delta(t) pi+1 = pi + vi*delta(t) + (1/2)*a*Delta(t)^2.
Where delta(t) is a constant and a = gravity unless the springs have hit the ground. When the object hits
the ground a = Fg + Fs = (1/2)*((grav)*delta(t) + K*(distance(p0 - p1) - restlength)
|
The following files are part of this project:
- main.cxx
- gl_window.cxx
- gl_window.h
- gui.cxx
- gui.h
- gui.fl
- physics.h
- coords.h
- README
- Makefile
- plus this html file, the images and movieclip.
The Makefile can be used to compile the files on the unix servers and lab machines in JB 105.
The command to compile is gmake or gmake all.
Resources
- Game Physics tutorial by Glenn Fidler.
- NeHe has many tutorials that I can review for my project.
- Tutorials by Gustavo Oliveira.
Gustavo is currently working at Electronic Arts as a software engineer. He has several tutorials
on springs and implementing jelly or cloth objects.
- Physically based modeling ppt recieved from Nishant Joshi believed to be created by Alisa