Diane Pederson (dpderso@ucsc.edu)

Animation of flexable object

CMPS 161 W09
Final Project Proposal
Date: 2/3/09



Development Platform

Project Description


Add user interaction
   
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: 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

Video file (1.9MB)
Source code and executable