Game Development Reference
In-Depth Information
Exercise Set 4.4
Carry out the operations indicated.
a. f (5), for f (x) ¼ 3x þ 7
b. f (2), for f (x) ¼ 3x þ 5
c. f (x þ 1), for f (x) ¼ 4x þ 5 2x
d. f (x 3), for f (x) ¼ 4x þ 5 2x
e. f (2x), for f (x) ¼ 4x þ 5 2x
f. g (1), for g (n) ¼ 3n 2
2n
g. s (0), for s (x) ¼ 5x 2
þ 4n
h. s (2a), for s (x) ¼ 5x 2
þ 4n
i. g (4), for g (x) ¼x 2
j. g (a 1), for g (x) ¼x 2
Using Visual Formula
Visual Formula allows you to explore relations between domain and range
values. The equations you work with as you conduct these explorations can be
characterized as functional relations. In subsequent chapters you explore such
relations in greater detail. For now, you can use Visual Formula to program
variables for fields so that you can explore how equations create domain-range
relations.
To set up functions using Visual Formula, you use the f()Func menu item, which
generates the f () operator. This operator captures the expression you place
between its open and closing parentheses. The output of the operation is stored
in a special Visual Formula variable, z . As Figure 4.15 illustrates, the f () operator
allows you to operate on values you assign to x . You then access the value of the z
variable in the lower equation composition area. When you click the equal sign
button in the solution panel of the upper equation composition area, you retrieve
the value of z .
Here are a few functions you can set up in the upper equation composition area.
Refer to Figure 4.16 as you work. Detailed instructions for setting up the basic
function follow.
Search WWH ::




Custom Search