imagico.de
imagico.de

imagico.de

Raytracing

Mechanics simulation experiments

In May/June 2002 i started some experiments simulating mechanical systems in POV-Ray. Here you can find a selection of animations i made during those experiments.

basic movement

The first tests used simple a simple forward euler integration method. Collisions with the environment are calculated with impact formulas.

The first animation on the right shows such a system with a single point mass moving under the influence of gravity. Energy loss during collisions is modeled as a multiplier for the speed <1 for every collision occurring.

Animation 1: single ball (mpeg, 240x180, 380k)

Animation 1: single ball

I then added collision detection between multiple moving balls. In contrast to the environment collisions these are modeled though elasticities from the beginning on. Later i also implemented elasticity based environment collisions.

The animation on the right shows 16 balls with different radii interacting in such a simulation.

Animation 2: multiple balls (mpeg, 320x240, 449k)

Animation 2: multiple balls

more complex objects

Next i started implementing connections between the masses. With these simulating more complex structures is possible without much extending the simulation system.

Friction turned out to be a critical aspect with such systems. In addition much more integration steps were necessary for the relatively stiff connections.

The animation shows two small cubes, each made of 8 masses connected at the edges and the face diagonals.

Animation 3: small cubes (mpeg, 320x240, 623k)

Animation 3: small cubes

More complex geometries turned out to be very slow when simulated in POV-SDL.

Here you can see a relatively soft larger cube deforming when hitting the ground. In addition to the elasticity also damping is simulated for the connections now.

Animation 4: deforming larger cube (mpeg, 320x240, 249k)

Animation 4: deforming larger cube

The environment collisions are meanwhile also modeled as elasticities. This is achieved with help of the IsoCSG library and the vGradient() macro from POV-Ray 3.5 math.inc for calculating the gradient of the environment function. This way arbitrarily complex geometries can be used for the environment.

This animation shows a cube similar to the last one, but with solid faces and a more complex environment to interact with.

Animation 5: solid cube interacting with more complex environment (mpeg, 320x240, 376k)

Animation 5: solid cube interacting with more complex environment

There are many possible geometries that can be simulated with such a system of masses connected through elasticities, here are a few more examples:

Animation 6: line of masses interacting with a single unconnected ball Animation 7: line of masses connected to a beam
Animation 6: solid cube interacting with more complex environment (mpeg, 320x240, 623k) Animation 7: solid cube interacting with more complex environment (mpeg, 320x240, 623k)

water interaction

I also made some tests with water interaction using a very simple yet effective method for generating water waves described in:

http://freespace.virgin.net/hugo.elias/graphics/x_water.htm
http://www.darwin3d.com/gdm1999.htm#gdm1299
http://runevision.com/3d/anims/anims.asp

This method of course has it's limitations, especially when the waves are stronger. The following 2 animations show some of these problems.

water/ball interaction, slow motion 1:2 water/ball interaction with floating balls
water/ball interaction, slow motion 1:2 (mpeg, 320x240, 665k) water/ball interaction with floating balls (mpeg, 320x240, 499k)

Some further discussion of some of these simulations can be found on the povray.org newsserver:

Subject: balls simulation (665k)
Date: Mon, 13 May 2002 00:09:01 +0200
Newsgroups: povray.binaries.animations
From: Christoph Hormann <chris_hormann@gmx.de>
news://news.povray.org/3CDEE7FD.B2EA955@gmx.de
http://news.povray.org/3CDEE7FD.B2EA955@gmx.de

Subject: ball simulation 2 (2x500k)
Date: Wed, 15 May 2002 18:51:08 +0200
Newsgroups: povray.binaries.animations
From: Christoph Hormann <chris_hormann@gmx.de>
news://news.povray.org/3CE291FC.E1C0909C@gmx.de
http://news.povray.org/3CE291FC.E1C0909C@gmx.de

Subject: Balls connected (377+500k)
Date: Thu, 30 May 2002 13:46:19 +0200
Newsgroups: povray.binaries.animations
From: Christoph Hormann <chris_hormann@gmx.de>
news://news.povray.org/3CF6110B.FF7822E7@gmx.de
http://news.povray.org/3CF6110B.FF7822E7@gmx.de

Subject: balls 4x4x4 grid (249+198k)
Date: Sun, 02 Jun 2002 11:40:02 +0200
Newsgroups: povray.binaries.animations
From: Christoph Hormann <chris_hormann@gmx.de>
news://news.povray.org/3CF9E7F2.777F427@gmx.de
http://news.povray.org/3CF9E7F2.777F427@gmx.de

Subject: More Balls (623+376k)
Date: Wed, 05 Jun 2002 12:13:54 +0200
Newsgroups: povray.binaries.animations
From: Christoph Hormann <chris_hormann@gmx.de>
news://news.povray.org/3CFDE462.AD6E8C74@gmx.de
http://news.povray.org/3CFDE462.AD6E8C74@gmx.de


crane simulations

As part of a dynamics simulation course at university i also did some simulation on crane models. Here are two of them calculated with the POV-SDL based system like those above.

Animation 8: small crane Animation 9: larger crane collapsing under it's weight
Animation 8: small crane (mpeg, 512x384, 1246k) Animation 9: larger crane collapsing under it's weight (mpeg, 512x384, 280k)

The color of the connection represents the stress according to the following color map:

Stress color map

Apart from these i also made some simulations of more complicated crane models with a faster simulation system developed by the Institut für Dynamik und Schwingungen.

Animation 10: more complex crane model Animation 11: more complex crane model
Animation 10: more complex crane model (mpeg, 640x480, 1246k) Animation 11: more complex crane model (mpeg, 640x480, 280k)
Animation 12: more complex crane model  
Animation 12: more complex crane model (mpeg, 640x480, 1246k)