Graphics Programs Reference
In-Depth Information
100%, they start to become pixellated and look a little rough around the edges. For
best results, the maximum scale should be 100%. Since the scale factors _xscale and
_yscale are equal to 100*dr , the largest value for dr needs to be 1. Since dr =
d/(d+z) , we will get dr = 1 only when z = 0 . In order to achieve this, we have to pay
attention to the relationship between the radius r and the depth of the center of rota-
tion zc . The maximum and minimum values of an object rotating in a circle on the x-z
plane are zc+r and zc-r respectively. We will get what we want by setting zc = r .
The Flexibility of 3D
In the last exercise we saw how a few simple changes to the path characteristics
enabled us to quickly make visual adjustments. Now that we have completed rotating
objects about the y-axis, let's take a closer look at the parameters that are easily
modified and give you a tremendous amount of control over the look of your projects.
Viewing Distance
One very important control that you have is the viewing distance d from the viewer to
the screen. Figure 6.24 shows the effects of three examples with different values for d .
Our initial value for d is 400. When we increase d to 500, the objects are farther from
us and the perspective is flattened. When we decrease d to 300, the objects are closer
to us and the perspective is more exaggerated.
Figure 6.24 Effects of changing the viewing distance
Circle Radius
As we saw in the last exercise when the objects looked too cramped together, another
obvious one-line code change that affects the overall appearance is the radius of the
circular path. Figure 6.25 shows three examples with different values for the radius r .
Search WWH ::




Custom Search