|
|
| Instructor:
Irfan Essa TSRB 230A. Office Hours: After Class |
Location: CoCB 102 | |
| TA:
Justin Jang Office Hours: Monday 1-2p, Wednesday 4-5p in CoCB 104a (DML) |
Day/Time: Tuesdays - Thursdays 4:35pm-5:55pm |
Goals:The goal of this assignment is to use the Open Dynamics Engine (ODE) to explore certain aspects of physical simulation. The ODE Documentation will be an indispensable resource throughout this assignment.The assignment is broken up in 3 parts. Part 1, 2, & 3. Part 1 is DUE 11/2/04 (Before Class) and Parts 2 & 3 are due 11/9/04 (before class). Part 1 | Part 2 | Part 3 | What to Turn In | Helpful Tips Part 1: Gravity & Time-steps (30%)Setting up ODEDownload the latest version of ODE (version 0.5 as of 2004-05-29) from sourceforge. (The links are found on the ODE download page. To use ODE, one only needs to get a binary release. The source code is also available. The ODE download page has a good explanation of the different binary releases available. The suggested release for this assignment is ode-bin-0.5-msvc-dll-SINGLE-debug-trimesh.zip, which provides a dll and lib compiled in Microsoft Visual Studio in debug mode with triangle mesh support and single precision float computation. Also get ode-0.5.tgz, which is the source code.
A Simple Dynamic SimulationThe folder /net/dvfx/CA/ProblemSets/PS3/code/part1_msvc6 contains a simple C program that drops a ball subject to gravity. Copy these files to your own directory and open the .dsw file into MS Visual C++ 6.x (available in the States Cluster and DML lab).
The file fall.c (included in the above directory) is a simple C program that drops a ball subject to gravity. It writes a file "output.txt" containing the y-position of the ball over the first ten 0.1 second time-steps. (Observe that dropping a ball using ODE is as simple as creating a world, defining gravity for that world, creating a body in that world, and stepping the time in that world.)
Dropping BallsModify the ball dropping program to drop a ball N times, each with a different a time-step, and record the final position of the ball after 1 second (of simulation time, not real time). One way to do this is to create N worlds each with 1 ball each and simply step each with a different time-step size. Specifically, use N=20 and start with a time-step of 1 second decreasing it by half for each instance, i.e. ts=1 for 1 step, ts=0.5 for 2 steps, ts=0.25 for 4 steps, etc. Set gravity to (0.0, -9.80665, 0.0) for convenience, though feel free to play around with it. Discuss your results and observations.
Part 2: Collisions & Friction (50%)CollisionsThe folder /net/dvfx/CA/ProblemSets/PS3/code/part2_msvc6 contains a C program that shows how to connect bodies using joints and perform collision detection on the geometry (corresponding to the bodies). This is a demo of a chain of balls where one end is being tugged with a varying force (in this case the force varies according to a sine function. Collision detection is being performed between all balls that are not connected to each other by a joint and between the balls and the ground.
Dealing with instability
FrictionCreate a "billiard table" simulation using ODE. Billiard pockets are not required. The setup doesn't even have to look like a billiard table. The point is to experiment with friction. Four walls, a ground, and a handfull of balls is sufficient. You may want to look at the source code of the demos included with the ODE distribution (nested under the subdirectory "ode\test\" of the source distribution). Information on ODE friction parameters can be found in section 7.3.7 of the ODE documentation. To keep it simple, you can focus on the mu friction parameter, though the bounce parameter will probably come in handy here.Play around with the friction and the time-step sizes. In particular, what happens with high friction? What about large time-steps?
Part 3: Creative Simulation (20%)Create a scene or scenario that uses dynamic simulation. For example, create a short sequence of a Rube-Goldberg machine or create an interactive . But don't let this example limit the scope of what you can do. Anything that satisfies the requirements is fine.
Requirements:
What to turn in:Part 1:
You can combine all the discussion in a single textfile/htmldoc if you wish. You are free to use any platform you wish, but it must be able to run in the States Cluster, the DML lab, or the Mac lab in CoC (specify instructions in a README.TXT file). Depending on your success in getting the Drawstuff library to cooperate, this may involve writing your own front end to display graphics of balls and boxes, e.g. using OpenGL. A menu-driven gui is NOT necessary. Submit in /net/dvfx/CA/2004/Submit/P3/<username>/ (Include a README.txt file to say which files are which)
Help and Suggestions
Using the DrawStuff library with MSVC6 In addition, be sure to add "opengl32.lib glu32.lib ode.lib drawstuff.lib" to the list of libraries to link in the project settings.
|
|
CA 2004 Site Menu:
|