Please note that you must enter an edit mode in order to edit car locations and paths!
Commands implemented:
| -1: Loads accident 1. | -S: Saves current accident to accident 7. (Please do NOT try to save any files with this applet) |
| -2: Loads accident 2. | -w: Enters playback mode. |
| -3: Loads accident 3. | -Spacebar: Playback current accident being edited. |
| -4: Loads accident 4. | -g: Display draggable nodes for Car movement. |
| -5: Loads accident 5. | -s: Reset streets to default position. |
| -6: Loads accident 6. | -c: Reset cars to default position. |
| -7: Loads accident 7. (Please do NOT try to load this file) | |
| -[: Change to previous perspective view. | -]: Change to next perspective view. |
| -q: Enters edit mode for the accident. | -a: Playback accident. |
| -r: Enters edit mode for accident prevention by red car. | -f: Playback accident prevention by red car. |
| -e: Enters edit mode for accident prevention by green car. | -d: Playback accident prevention by green car. |
Instructions
You can use this applet to move cars and roads, and edit the motion of the cars. Press and hold the 'g' key to see all the draggable points of the cars and roads. To move a car or road, you must be in an edit mode.
To enter an edit mode, press either the 'q', 'e', or 'r' key. The 'w' key will return you to playback mode. Left click and drag any of the draggable points to move a car or road.
To define a motion path for a car, be in an edit mode, right click on a car, and then right click on 3 points that will define the motion of that car. You can drag the points around to change the path the car will travel. Press and hold the spacebar to see what your motion will look like. In order to remove paths, just move a car by clicking and dragging that car.
In order to playback your motion paths, you can use the 'a', 'd', and 'f' keys. The 'a' key plays back the motion defined in the 'q' edit mode. The 'd' key plays back the motion defined in the 'e' edit mode. The 'f' key defines the motion defined in the 'r' edit mode. These playback keys are available at any time, you do not need to be in an edit mode to use them.
How to Make Good Motion Paths
Try to avoid sharp bends or U-turns in your motion paths. Longer motion paths make the cars move faster, shorter motion paths make the cars move slower. Having two points spaced closely together on a path makes the car slow down suddenly. Two points very far apart will cause the car to speed up momentarily. Playback your motion paths, and keep moving the points around till you get a good motion path playback.
---------------------------------
Source code: accident bezier car pts street
Built with Processing








