Project P1d for CS4496, instructor Jarek Rossignac.


Pop (from left) Type Accident

Blue car has left another gap for red car who (dun, dun dun...) does not see green car . . . CLUNK-BASH-SMASH-KERPLUNKY!!

Prevention.
The green car could have been aware that someone had left a gap for the side street. Also more horn action works as well. (d will simulate this).

The red car could have either wait a bit longer to ensure no one was coming in the next lane over. Also, slow down a bit, ok? (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