Graphics Programs Reference
In-Depth Information
The problem is that the object is rotating about its own axis opposite to the circular
path motion. We need to get these two movements consistent. Fortunately, all we have
to do is to change the plus sign in line 76 to a minus sign. Make the change below, save
your movie, and you are good to go. Notice that you also get aerial perspective with no
extra work, since we had it in our original file.
75
76
// use the angle to set the frame position
thisFrame = 32 - Math.round(startAngle*totalFrames/360)%
totalFrames;
Tip: You may get smoother motion by changing speedfactor to a smaller number such
as 20 or 25 in line 20 of the script.
Panoramas
Panoramic images can be created either photographically or in many 3D software pro-
grams. The basic idea is to stand in the middle of some environment of interest and
take a number of partially overlapping photos around a full 360 degrees. There are a
number of programs available such as REALVIZ Stitcher and VR Worx 2.6 that enable
you to stitch the individual shots together into one single panoramic image that dis-
plays the whole scene. These are called cylindrical panoramas. The left side of the
image aligns with the right side of the image. Fish-eye lenses are also used to capture
a full 360-degree view of the scene both horizontally and vertically to create cubic or
spherical panoramas. We will focus our attention on cylindrical panoramas.
Exercise 8.3: Simulating a Panorama
In this exercise, we will set up a simple navigational interface that will enable the user
to continuously explore a panoramic background image that is larger than the Stage.
Through ActionScript, the user controls the left and right movement of the background
by placing the cursor to the left and right of the center of the Stage. To see the results
of this exercise, locate and play 8_3_panoDONE.swf (Figure 8.8).
Step 1: Getting started
Open 8_3_pano.fla in the Chapter 8 folder. Set the Stage display size to be 25%.
Select the pano layer in the Timeline. Locate LowerFalls.jpg in the Library. Drag the
image onto the Stage, then center horizontally and vertically as shown in Figure 8.8.
 
Search WWH ::




Custom Search