This can be summarized as a ratio: cog10/cog30=0.33 (10/30=0.33). The MELScript to rotate gear05 by 1/3 the rotation value of gear04, in the opposite direction is:
So here's the MELScript so far:
Finally, the difficult part - gear05 lifting the door.
gear05 contains a single cog30. For each degree cog30 rotates, the door will translate in the Y axis. If we calculate the circumference of cog30 and divide by 360°, we'll know how much to translate the door in the Y axis.
Here's a quick breakdown of this process (Fig.35):
1. Rotating cog30 360° will translate door the same distance as the circumference of cog30.
2. Therefore, we can assume that by rotating cog30 1°, door will translate circumference/360.
The circumference of a circle is calculated as: 2? * radius
Where ? (Pi) = 3.14159, the circumference of cog30 is:
= 2? * radius
Therefore, rotating gear05 by 1° will translate door:
Rotating gear05 by 90° will translate door:
The MELScript to translateY door, based on the rotation of gear05 is (Fig.36):
So, the completed MELScript is:
Creating an Expression
Now that we've written the MELScript, the next step is to use it to create an expression.
Open the Expression Editor (Window > Animation Editors > Expression Editor)(Fig.37).
Enter the name "gearRotation" into the Expression Name field.
< previous page continued on next page >