9

150 Chapter 4: Obj ect Properties
Note:
Thecompfunctionisanalternativetothe
n o t a t i o n V. x , V. y, V. z .
Special Animation Function
Funct i on M ea n ing
noise(p,q,r) 3D noise: return s a randomly
generated po sition
Thearbitraryvaluesp,qandr,areusedasa
random-generation seed. You can reuse these
values to ensure that noise() returns the same
value.
Tr igonomet r ic Functi ons
This topic is a quick review for readers w ho need a
reminder about this area of mathematics. If you ’re
familiar with trigonometry, you can skip this topic.
If you find this topic difficult to follow , you might
consult a more basic reference on mathematics.
Trigonometric functions are principally used to
model or describe:
Therelationbetweenanglesinatriangle(hence
the name).
Rotations about a circle, including locations
giveninpolarcoordinates.
•Cyclicalorperiodicvalues,suchassound
waves.
The three basic trigonometric functions are
derived from an angle rotating about a unit circle.
Trigonometric functions based on the unit circle
The tangent function is undefined for x=0.
Another way to define t he target is:
Because XYR defines a right-angled triangle, the
relation between the s ine a nd cosine is:
The graphs of the basic trigonometric functions
illustrate their cyclical nature.
Graphs of basic trigonometric functions
Thesineandcosinefunctionsyieldthesame
values, but the phase differs along the X axis by
/2: in other words, 90 degrees.
Theinversefunctionsforthetrigonometric
functions are the arc functions; the inverse only