Project P1d for CS4496, instructor Jarek Rossignac.


Swing Type Accident

Here the red car swings out wide during a right turn and TOTALLY runs into the green car! (who, again, is patiently waiting 5 minutes for her light to change!) KRUNCH!!

Prevention.
The green car could have stoped further away from the light and also moved closer to the curb (d will simulate this).

The red car could have stayed close to the medain, so as to not swing out as wide. Also a delayed turn and a sharp tug on his wheel could have saved the day (no, not Saves the Day, geeez!). You can press f to simulate this.


To view this content, you need to install Java from java.com


How to & Command List

0 - Linear Interpolation Mode (done on a per frame basis)
1 - Bezier Interpolation Mode (done on a per frame basis)
2 - Circular Interpolation Mode (done on a per frame basis)
r - Toggle road editor on/off. (When this is on, all cars will be removed from the display)

SHIFT-1 - Show 1 Car
SHIFT-2 - Show 2 Cars
SHIFT-3 - Show 3 Cars
SHIFT-4 - Show 4 Cars
SHIFT-5 - Show 5 Cars
SHIFT-6 - Show 6 Cars

- (minus) - Subtracts a frame from the current car (you can never go below 1)
= (equals) - Add a frame to the current car (never going above 6)
+ (plus) - Add a frame to the current car (never going above 6)
3 - Use 3 key frames per car
4 - Use 4 key frames per car
5 - Use 5 key frames per car
6 - Use 6 key frames per car

space - Start/Stop animation
a - Start/Stop animation

c - Reload the intial accident scenario.
f - Display how the driver should avoid this wreck.
d - Display how the person getting hit should have driven defensivly.

Source code: p1d.zip

Built with Processing