Kurt Margenau
extreme[at]gatech.edu
4496 Project Site

Florian Hecht
Florian.Hecht[at]gatech.edu

Project 1: Part d

Go to Tutorial

The goal of this part of the project was to create an 'accident re-creator', that can be used to easily re-create the scene of an accident and to simulate that accident.

For that it needs the ability to create a simple road setting and to place several cars on the road. Specify where every car is what point in time. These basics where done for the P1c part of the project. P1d is an extended version of our road editor and car keyframe system. It also has a physics engine to simulate the actual accident which is hard to keyframe so that it looks realistic. To add to the realism (or believability) we added sounds, sparks and skid marks to the simulation.

The program has a slick button interface that also animates parts of the interface in and out of the screen to be as unobtrusive as possible. Part of the interface are buttons to load pre-made examples of accident situations, together with versions in which the accident was prevented through defensive driving.

Simulation details:

The cars are animated through a keyframe system. If a collision is detected the cars are turned into physics objects. Are is the simulated by two particles with equal mass, that have to fulfill a constraint that they have a certain distance between them. The verlet integration scheme is used for that. This handles the movement and collision response.

To detect collisions we use a capsule module for the car. A capsule is a line segment with an associated radius. The two particles that are used for the simulation define the line segment. This collision test is also done when animating the cars with keyframes, so that we can detect collision and switch to a physics simulation.

The sparks that appear at collision between two cars, are created in a tangential direction with respect to the line of the shortest distance between the two cars. The sparks are also verlet integrated particles. The direction is from a random distribution round the tangent vector and the lifetime is also random. The particles get a acceleration in the opposite direction of the car that crashed into the other car. This gives the appearance that the sparks get reflected from the other car.

The skid marks are created by tracking the position of the four wheels of the car after the crash until the car stops. This simulates that a driver will instinctively break hard after a collision. The path of the four wheel is then tracked by a transparent thick black line.