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.13.1 Piston

1. Create a level object called "up&down".

2. Create a cylinder representing a piston under "up&down" level.

3. Create a PATH method to the same level with the piston.

4. Create a vertical axis under the method level. Play the animation and the piston will move along the axis with constant speed ... no good.

5. Create a TRANSFORM method at the same level with the "up&down" object. Multi-select the TRANSFORM method and "up&down" and select Modify/Structure/Swap to change their order in hierarchy; the method should be above "up&down".

6. Create an axis and a circle inside the transform method as shown in the picture below.

realtut6.13.1_1.png (3858 bytes)
YouTube Figure T6-41: TRANSFORM Method Modifies the Time.

Play the animation and the piston will act like a real piston.

7. Use Modify/Properties/Animation to change the frequency of the TRANSFORM method to 4 and the piston will run up and down four times.

Let's try to understand why the piston started to go up and down just like any real piston.

The transform objects requires two parameters; in this example an axis and a circle. The method evaluates a point from the circle corresponding the current time. Then it projects the point to the axis and the parameter value corresponding the projected point on the axis is the new time. For example, if the projection of the evaluated point hits the beginning point of the axis, the new time would be 0.0. If the point hits the end point of the axis, the new time would be 1.0.

In this example we used a circle, but it is possible to use any other evaluable object as well.

ghh don'tpanic