[0123]At step 53, the CPU 30 performs the distance calculation process, and then proceeds to the next step. In the distance calculation process, the current distance realD between the controller 7 and the markers 8L and 8R is calculated based on the first coordinate data Da1 and second coordinate data Da2, which have been transmitted from the controller 7 and stored in the main memory 33. Hereinafter, processes performed at step 53 will be described in detail with reference to FIGS. 16 and 17.
[0124]As shown in FIG. 16, the CPU 30 obtains the first coordinate data Da1 and second coordinate data Da2 (step 71), and calculates a distance mi (step 72). As shown in FIG. 17, the distance mi is a distance between two points in the taken image. These two points correspond to images of the markers 8L and 8R in the taken image, and coordinates indicating the two points are the first coordinate data Da1 and second coordinate data Da2. Accordingly, the CPU 30 uses the first coordinate data Da1 and second coordinate data Da2 to calculate the distance mi. To be specific, when the first coordinate data Da1 is position coordinates (Lx, Ly) and the second coordinate data Da2 is position coordinates (Rx, Ry), the distance mi is obtained by the following equation.
mi = ( Rx - Lx ) 2 + ( Ry - Ly ) 2 [ equation 1 ]
[0125]Next, the CPU 30 calculates a width w (refer to FIG. 17) which indicates, with respect to setting positions of the markers 8L and 8R, a width for which the image pickup element 743 is able to take an image (step 73). The width w is obtained by the following equation.
w=wi.times.m/mi
Here, m represents a setting distance between the markers 8L and 8R (actual setting distance between the the markers 8L and 8R; e.g., 20 cm), and is a fixed value. Also, wi represents a width wi of the image taken by the image pickup element 743 which corresponds to the width w. The width wi is also a fixed value. Since the setting distance m and width wi are fixed values, these values are prestored in storage means (not shown) within the game apparatus 3. Note that, the player is allowed to discretionarily determine the setting positions of the markers 8L and 8R in accordance with the player's environment, thereby determining the setting distance m. In such a case, the player is required to input a distance between the discretionarily determined setting positions of the markers 8L and 8R as the setting distance m so that the width w can be obtained from the above equation.
[0126]Next, the CPU 30 calculates the current distance realD (refer to FIG. 17) between the image pickup element 743 (controller 7) and the markers 8L and 8R, by using the width w and a viewing angle .theta. of the image pickup element 74, and updates the current distance data Db3 (step 74). Then, the distance calculation process in the subroutine ends. Here, the current distance realD is obtained by using the following equation.
realD=(w/2)/{tan(.theta./2)}
Since the viewing angle .theta. is a fixed angle, the angle .theta. is prestored in the storage means (not shown) within the game apparatus 3.