17A % B gives the remainder after every whole B has been removed
from A.
10 % 3 = 1 (10 - 3 = 7) ( 7 - 3 = 4) ( 4 - 3 = 1) ( 1 < 3, so stop)mod is very handy for range control. it allows you to chop up one big range into a repeating series of little ranges. when you use the
% operator, say x % y, you are mapping values from the range
[0, x] to the range [0, y-1]. for example, if y = 5:
x : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17.. x % y : 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2..
ranges of values that repeat are called periodic. functions that generate repeating value ranges are
called periodic functions. periodic functions are usually designed to return values in a convenient range,
like [-1, 1], or [0, 1].

f(t), the following general structure outlines how to control aspects of
the waveform:
result = amplitude * f( frequency * t + phaseShift );
the input to a periodic function is a continually increasing value, like time. so we can think of periodic functions as convenient engines—with time values as fuel, they can drive properties like position, opacity, orientation, etc.
examples:swf]
[fla]
swf]
[fla]
swf]
[fla]
swf]
[fla]
swf]
[fla]