Lab 3
In this lab you will learn the following:
Transformation matrices (p. 134), objtowolrd script (p. 137), spacetospace script (p. 139), attributes (p. 143), dynamic attributes (p. 145), animation (p. 147), playback (p. 150), animation curves (p. 153), keyframing (p. 155), infinity (p. 157), keys (p. 158), breakdown keys (p. 163), printAnim script (p. 167), printTangentPosition script (p. 171), motion paths (p. 193).

Working methods:
Study pages 134-174 and paragraph 3.5.5 "Motion Paths" (pages 193-196).

Assignment:
Write "Falling Letters" effect. To see the working effect download the avi movie bellow:
Download FallingLetters.avi (approx. 1 MB)

Bellow is the specification of a fallingLetters() function you will need to write:
/***************************************************
Falling letters effect:

Inputs:
$textString = text string to animate
$topY = initial string y coordinate (falling from)
$bottomY = destination y coordinate (falling to)
$maxLetterTime = time in frames (range: 30-120, default 60)
$letterTimeInterval = waiting time between letters (10-30, default 10)
$letterRotationDegree = rotation around Y axis (180 or 360, default 360)

Preconditions: 
1) $textString is not empty
2) $topY - $bottomY >= 10
****************************************************/

proc fallingLetters(
    string $textString,
    int $topY,             
    int $bottomY,
    int $maxLetterTime, 
    int $letterTimeInterval, 
    int $letterRotationDegree
    ){

    . . . 
}
Playblast movie was made after the following parameters were passed to the fallingLetters() function:
fallingLetters("Letters", 10, 0, 60, 10, 360);
As you can see the letters are falling from y = 10 to y = 0, the time that takes 1 letter to full is set to 60 frames, there is 10 frames interval in waiting time between the animation of each falling letter and each letter is rotated around y axis 360 degrees.

Notice that you have to check the preconditions and show errors if:
1) text string is empty
2) topY – bottomY < 10

You also need to show warnings if the following parameters are passed not in the allowed range after you replaced them with default values as specified bellow:
$maxLetterTime = time in frames (range: 30-120, default 60)
$letterTimeInterval = waiting time between letters (10-30, default 10)
$letterRotationDegree = rotation around Y axis (180 or 360, default 360)


Guidelines:
Tip: iterate through the children nodes of the $textString, use eval() command to set keyframes.

Notice that not all the children nodes can be transformed and animated. To see all the children of $textString open the Outliner in Maya (click on the marked in yellow icon). Curve1, curve2, curve3 and other curves (with blue icons) can be transformed and animated.