Header image
 
Ph.D. Student  
 
 

Crash Test Simulator

This is a project that I did together with undergrad Amro Mousa.

Project Purpose

The purpose of Project 1 is to use all of the knowledge from the previous projects to form a simple accident simulation software. The software makes use of keyframing and other techniques to animate vehicles in either 2D or 3D, depending on user preference.

Usage Instructions

Note: Because we respect all Mac-Users, everytime when we are talking about the right-mouse button, you can achieve the same result with your one mouse-button and simultanousely pressing CTRL. (actually Jarek made us do this :) )

Creating new Car curves

To create a new car simply click on the "Create new car" button. Toggle the "Adjust Car" button and drag the car around when you select the number. Press 's' to create a new keyframe. You can adjust the little tangent handle to control the tangents of the curve. If you want to hide the cars press 'c' at any time.
Alternativly you can create a new curve. Select the "Create curve" button and click and drag the control points. In this mode when you drag with the right mouse button you can adjust the tangent of the last control point. Windows users can also press a key while draging and adjust the length of tangent. When you like the result press ENTER and it will be saved, BACKSPACE to discard.
When you toggle "Adjust Curve", you can drag all the curve points and adjust their tangents. Using the right mouse-button just change the magnitude but not the direction of a tangent.
Please note, that adjusting the curve will not change the keyframe positions of the cars, on the other hand, changing the keyframe position always reset the path back. So adjusting is a fine-tuning step.
When you are done save your work with 'w', load it with 'l'.

Adding velocity

In the bottom window you see a curve with horizontal axis representing time, the vertical the relative postion of the curve with respect to arc length. Simply select a curve in any mode (create or adjust) and the corresponding curve will be displayed. To switch to a bigger view and back press 'e'.
With the left mouse button you can adjust the time value of a control point, the right mouse-button changes the positonon the curve. While draging a car will be shown, that shows the exact position.

Animation

Press 'g' to start animation, and adjust the speed with '+' and '-'. Pause every time you want with SPACE and stop animation by pressing 'g' once more. Animation is online available when all adjust buttons are off.
With 't' you turn off and on the collision detection and reaction. When you press 'd' you can detach the cars from the curve and let them animate with current velocity and angular velocity. This is just a testing feature and looks nice.
For convenience when you press 'G' the curvature driven animation is shown. However this does not work with collision detection.

3D view

The 3D view is only implemented in this applet, cause openGL in applet mode might not work for all people.
Press '3' to switch to 3D mode and see the cars moving. When the rendering is too slow on your computer press 'b' to display only boxes instead of the car model. Change the view by moving the mouse.
When you have a car selected in 2D view, i.e. you see the corresponding time-distance curve at the bottom, pressing 'f' in 3D mode will switch to first person perspective and back.

[ source code ]

Select on of our prepared crash situations.

 



Navigation