Project P1d for CS4496, instructor Jarek Rossignac

Team:

Jacob Bolton

Daniel King

Purpose:

The main purpose of the project was to bring together all of our P1 knowledge to produce an easy-to-use accident simulator.

Applet: Click Here

Implementation:

The Editor - Applet

The editor works by allowing a user to specify information about where cars are at certain times and how to interpolate between those points. The text below describes the keys and mouse clicks to use the interface. It should be noted that a car can have any number of frames from 0 on up, and that each segment between a car's frames gets the same amount of time to complete. All cars will execute their entire set of frames once through out the given time.

Click and drag polygon verts to move them.
Click and drag polygon mid-points to add verts.
Click and drag polygon verts off-screen to remove them.
Click and drag car number to move them.
Click and drag lines on cars to adjust velocities.

The following four keys affect the car the mouse is hovering over:
0 - Set linear interpolation.
1 - Set Bezier interpolation.
2 - Set circular interpolation.
3 - Set no interpolation.

a - Start/stop animation.
h - Creates cars.
s - Saves cars.
l - Loads cars.
w - Writes out cars.
+ - Add a frame to the currently selected car.
- - Delete the last frame of the currently selected car.
* - Add a car.
/ - Delete currently selected car.
p - Toggle car paths.
c - Toggle car controls.
r - Toggle road editor.
d - Toggle car to display.
f - Save screenshot.
Z - 3D zoom in.
z - 3D zoom out.
` - Switch to 3D mode.

C - Load chop accident. 
S - Load swing accident. 
W - Load swicth accident. 
L - Load pop-left accident. 
R - Load pop-right accident. 
O - Load our accident (rear end).

Accident Recreations:

Chop - Turn is too tight, hits stopped car.

Swing - Turn is too wide, hits stopped car.

Switch - Doesn't see car in other lane and hits it during lane change.

Pop From Left - Turning into the far lane without seeing traffic.

Pop From Right - Turning off of a lane and not seeing traffic.

Ours: Rear End - A rear-end scenario.