browse OpenProcessing

Quirky Titles
CrashTest
square_rain
browse all>

browse the portfolio of toxiclibs

PolarLines
MeshFaceExtrude
DashedDottedBox
CrashTest
see more>
CrashTest

CrashTest

uploaded by
toxiclibs
This example demonstrates the new winged-edge mesh structure in combination with the 3d verlet physics engine to simulate a crash test scenario. The winged-edge mesh provides connectivity information for each mesh vertex which is used to create a physical representation of the mesh and allows each vertex/particle to be connected with springs. Every frame the mesh vertices are updated to the position of their corresponding particle and due to the gravity in the space, the mesh is being deformed.

Usage: Press 'r' to restart the simulation.
Embed Code
Fave'd by 6 users
Sketch added to your favorites in your portfolio.
You must login/register to add this sketch to your favorites.

comments

source code

Comments

bejoscha
01 Aug 2010, 05:38
Very nice, but why does it look like the car gets "flat" before it actually "crashes" ?
Dave Bollinger
03 Aug 2010, 13:29
impressive as always karsten!!
wrt bejoscha's comment, agreed - after the crash, the particles shouldn't keep accelerating towards the wall (as 'gravity' would have them do). suggest that the sim would be a bit more realistic if you left out the x component of gravity, and instead did an initial .addVelocity(new Vec3D(-10,0,0)) when creating the particles. (it'll still compress into the wall too much, but then at least the parts could better rebound off it)
toxiclibs
04 Aug 2010, 14:40
thanks guys and sorry for setting wrong expectations there, but this was literally done in 5 minutes with no regard for physical correctness. I just found it interesting to access the mesh edges and convert them into springs. But because of this simple connection of vertices going only along the car chassis and the lack of any constraints between them (like angular limits, e.g. caused by the rigidity of materials), I wasn't even expecting it to look like it does now...
You need to login/register to comment.