realtlacitka.png (1143 bytes) Real3D Amiga Environment Real3D Amiga Tutorials Real3D Amiga Projects Real3D Amiga Macros Real3D Amiga Other Back to Real3D Amiga home page

6.20.3 A Wriggling Snake

This example demonstrates how the age of the object can be used for determining the time when the object should "die". As soon as the object gets old enough, it disappears. The sample object is moved along a B-Spline curve just like we did in our first CREATION example, but now we will also delete target objects so that the earlier an object is born, the earlier it dies.

1. Create the objects described in the example 6.19.3 but now add also the SDEL tag to the sample sphere:

                   SDEL l=t-fx>0.1

The variable "fx" defines the time when the object was created. The variable "t" represents the Current time. So, the age of the object is t-fx and when the age gets greater than 0.1, the object is old enough for the deletion.

Save and play the animation and in the beginning, it resembles our first CREATION example. However, soon the oldest spheres start to die and the number of spheres comprising the tube no longer rises.

realtut6.20.3_1.png (12031 bytes)
YouTube Figure T6-59: CREATION Method Animation.

Let's experiment with this animation a bit more. Reload it and try the following formula with SDEL tag:

                   SDEL l=t-fx>0.2*sin(12*t)*0.1

Play the animation and the length of the "snake" varies while it moves along the path.

ghh don'tpanic