Storage medium having stored thereon image processing program and image processing apparatus

A virtual plane surface PL is divided into a plurality of square regions such that the closer distance to a virtual camera VP a square region is located at, the smaller areas the square region is divided into. Distance information 41 indicative of distances of respective vertices composing each of the square regions from the virtual plane surface PL is read from the internal main memory 11e. Further, coordinate points of positions, which are distanced from respective vertices, which compose polygonal shape regions included in each of the square regions, by distances indicated by the read distance information in a direction perpendicular to the virtual plane surface PL, are used as polygon vertices, which define polygons, whereby the polygons corresponding to the curved surface SF are generated. From each of the square regions, substantially a common number of polygons are generated. In this manner, appropriate polygon information of the curved surface SF which is capable of securing a drawing quality can be generated.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2008-95401, filed Apr. 1, 2008, is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage medium having stored thereon an image processing program and an image processing apparatus. More particularly, the present invention relates to a storage medium having stored thereon an image processing program and an image processing apparatus which are capable of drawing an image of a curved surface (e.g., a curved surface indicative of a landform) as viewed from a virtual camera situated in a virtual three-dimensional space, an undulation of the curved surface being defined by a distance from a virtual plane surface arranged in the virtual three-dimensional space.

2. Description of the Background Art

Conventionally, when an image of a three-dimensional object as viewed from a virtual camera, the image being arranged in a virtual three-dimensional space, is to be drawn, the three-dimensional object is simply represented by image information composed of polygons, whereby the three-dimensional object is situated in the virtual three-dimensional space and the image is drawn therein. However, since the three-dimensional object is represented with a fixed degree of accuracy (that is, since the three-dimensional object is divided into polygons of a common size so as to configure a polygon model thereof), a problem is posed in that a huge amount of data needs to be processed.

In order to solve the problem, various methods, apparatus, and the like have been proposed. For example, a three-dimensional game apparatus is disclosed in which a plurality of types of division map information, which represents the three-dimensional object and which have different numbers of divisions, respectively, is stored in division map information storage means. A distance between the virtual camera and the three-dimensional object is calculated, and the division map information which has a smaller number of divisions is read when the distance becomes further (e.g., see Japanese Patent No. 3227158).

However, in the above-described three-dimensional game apparatus, since the plurality types of division map information (i.e., polygon information), which respectively have different numbers of divisions, needs to be stored in the storage means, the storage means such as a memory needs to have a large amount of capacity. Further, in the above-described three-dimensional game apparatus, if there are a greater number of types of the division map information which respectively have different numbers of divisions, an appropriate division map can be selected in accordance with the distance between the virtual camera and the three-dimensional object (i.e., a division map which is divided into a given number of divisions which are essential to secure a quality of the drawing, can be selected). However, the storage means such as the memory needs to have a further larger amount of capacity.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to solve the above-described problem and to provide a storage medium having stored thereon an image processing program and an image processing apparatus which are capable of generating appropriate polygon information so as to secure a quality of a drawing.

The present invention has the following features to attain the object mentioned above. The reference numerals, step numbers (denoted by S, which is short for step, and numbers), drawing numbers and the like in the parentheses indicate the correspondence with the embodiment described below in order to aid in understanding the present invention and are not intended to limit, in any way, the scope of the present invention.

The present invention is directed to a computer readable storage medium (11e) having stored thereon an image processing program (40) for drawing an image of a curved surface (SF, e.g., a landform or the like) as viewed from a virtual camera (VP) situated in a virtual three-dimensional space, an undulation of the curved surface being defined by a distance from a virtual plane surface (PL) arranged in the virtual three-dimensional space.

A first aspect of the present invention is directed to a computer readable storage medium (11e) having stored thereon the image processing program (40) causing a computer (10,11b) to execute a plane surface division step, a first distance reading step, a first coordinate point calculation step, a polygon generation step, and a drawing step. The plane surface division step (S301, S311) divides the virtual plane surface (PL) into a plurality of polygonal shape regions such that the closer a region is to the virtual camera (VP), the smaller areas the region is divided into. The first distance reading step (S407) reads, from storage means (11e,12), distance information (41) indicative of a distance from the virtual plane surface (PL), with respect to respective vertices of the plurality of polygonal shape regions. The first coordinate point calculation step (S409) calculates coordinate points of position which are respectively distanced from the vertices composing the plurality of polygonal shape regions by distances indicated by the distance information (41), which is read in the first distance reading step (S407), in a direction perpendicular to the virtual plane surface (PL). The polygon generation step (S411, S413, S415) generates polygons by using the coordinate points calculated in the first coordinate point calculation step (S409) as polygon vertices which define the polygons, the number of the polygons being substantially constant in each of the plurality of the polygonal shape regions. The drawing step (S109) draws an image of the polygons which are generated in the polygon generation step (S411, S413, S415), the image as being viewed from the virtual camera (VP).

A second aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the second aspect, the plane surface division step (S301, S311) includes a size evaluation value calculation step (S307) of calculating a size evaluation value indicative of a size of an image of each of the plurality of the polygonal shape regions as viewed from the virtual camera (VP), and divides each of the plurality of the polygonal shape regions such that the size evaluation value calculated in the size evaluation value calculation step (S307) becomes equal to or lower than a predetermined threshold value. Accordingly, the image as viewed from the virtual camera (VP) can be easily divided as necessary and sufficiently to secure a quality of the image.

A third aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the second aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the third aspect, the size evaluation value calculation step (S307) calculates, as the size evaluation value, an area of an image of a sphere (BA) having a great circle which is inscribed in or circumscribed around each of the plurality of polygonal shape regions, the area of the image as being viewed from the virtual camera (VP). Accordingly, an appropriate size evaluation value can be calculated easily.

A fourth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the second aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the fourth aspect, the plane surface division step (S301, S311) further includes a first division step (S301), a division necessity determination step (S309), and a second division step (S311). The first division step (S301) divides the virtual plane surface (PL) into a first predetermined number of regions. The division necessity determination step (S309) determines, with respect to each of the first predetermined number of regions generated in the first division step (S301), whether or not the size evaluation value calculated in the size evaluation value calculation step (S307) is equal to or lower than the threshold value. The second division step (S311) further divides a region, among the first predetermined number of regions, whose size evaluation value is determined not to be equal to or lower than the threshold value in the division necessity determination step (S309), into the first predetermined number of regions. The division necessity determination step (S309) determines, with respect to respective regions additionally generated in the second division step (S311), whether or not the size evaluation value thereof calculated in the size evaluation value calculation step (S307) is equal to or lower than the threshold value. The plane surface division step repeatedly executes the division necessity determination step (S309) and the second division step (S311) until the size evaluation value of all the generated regions become equal to or lower than the threshold value. Accordingly, the image as viewed from the virtual camera (VP) can be easily divided as necessary and sufficiently to secure the quality of the image.

A fifth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the fourth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the fifth aspect, the first division step (S301) equally divides the virtual plane surface (PL) into the first predetermined number of regions. The second division step (S311) equally divides the region, among the first predetermined number of regions, whose the size evaluation value is determined not to be equal to or lower than the threshold value in the division necessity determination step (S309), into the first predetermined number of regions. Accordingly, since the regions are divided equally, the divisions can be performed efficiently.

A sixth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the fifth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the sixth aspect, the virtual plane surface (PL) is a quadrangular plane surface. The polygonal shape is of a quadrangular shape. The first division step (S301) divides the quadrangular virtual plane surface (PL) into quarters by two straight lines which are each formed by connecting middle points of two facing sides of the quadrangular virtual place surface (PL). The second division step (S311) divides the quadrangular region, whose size evaluation value is determined not to be equal to or lower than the threshold value in the division necessity determination step (S309), into quarters by two straight lines which are each formed by connecting middle points of two facing sides of the quadrangular region. Accordingly, since the quadrangular regions are each divided equally by the two straight lines which are each formed by connecting middle points of two facing sides of each quadrangular region, the divisions can be performed more efficiently.

A seventh aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the sixth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the seventh aspect, the image processing program (40) further causes the computer (10,11b) to execute a re-division step (S315) of dividing the plurality of polygonal shape regions, which are generated in the plane surface division step (S301, S311), into a second predetermined number of small regions which are each of a quadrangular shape. The first distance reading step (S407) reads the distance information (41) of respective vertices composing each of the quadrangular small regions, which are generated in the re-division step (S315), from the storage means (11e,12). The first coordinate point calculation step (S409) calculates coordinate points of positions which are respectively distanced from of the vertices composing each of the quadrangular small regions generated in the re-division step (S315) by distances indicated by the distance information (41) read in the first distance reading step (S407) in a direction perpendicular to the virtual plane surface (PL). The polygon generation step (S411, S413, S415) generates polygons respectively having the coordinate points calculated in the first coordinate point calculation step (S409) as the polygon vertices. Accordingly, polygons having appropriate sizes can be generated efficiently so as to represent the curved surface (SF).

An eighth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the seventh aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the eighth aspect, the polygon generation step (S411, S413, S415) includes a triangle generation step (S411) of generating two triangle polygons corresponding to two triangle regions which are obtained by dividing each of the quadrangular small regions, which are generated in the re-division step (S315), by a diagonal line therethrough. Accordingly, polygons having appropriate sizes can be generated efficiently so as to represent the curved surface (SF).

A ninth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the eighth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the ninth aspect, the re-division step (S315) equally divides each of the quadrangular regions generated in the plane surface division step (S301, S311) into an even number (6 in this case) of small regions, respectively, in two directions along adjacent sides of each of the quadrangular region. The triangle generation step (S411) includes an outer-circumference extraction step and a diagonal line selection step (FIG. 11B). The outer-circumference extraction step extracts outer-circumference small regions, from among the second predetermined number (36 in this case) of small regions, which each includes a part of sides composing each of the quadrangular regions generated in the plane surface division step (S301, S311) as at least one of sides composing each of the small regions. The diagonal line selection step selects diagonal lines for dividing the quadrangular regions, which are divided in the plane surface division step, into triangle regions, respectively. With respect to such outer-circumference small regions, among the outer-circumference small regions extracted by the outer-circumference extraction step, that include vertices composing each of the quadrangular regions generated in the plane surface division step, the diagonal line selection step selects diagonal lines including the vertices as diagonal lines for dividing the quadrangular outer-circumference small regions. On the other hand, with respect to such outer-circumference small regions, among the outer-circumference small regions extracted by the outer-circumference extraction step, that do not include the vertices composing each of the quadrangular regions generated in the plane surface division step, the diagonal line selection step selects diagonal lines for dividing the quadrangular outer-circumference small regions such that the diagonal lines of the outer-circumference small regions adjoining respectively are approximately perpendicular to each other (FIG. 11B). Accordingly, polygons which have been divided different numbers of times respectively (whose sizes are different from one another) can be connected to one another smoothly (FIG. 12).

A tenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the sixth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the tenth aspect, the polygon generation step (S411, S413, S415) includes a triangle generation step (S411) of generating two triangle polygons corresponding to two triangle regions obtained by dividing each of the quadrangular regions, which are generated in the plane surface division step (S301, S311), by a diagonal line therethrough. Accordingly, triangle polygons having appropriate sizes can be generated so as to represent the curved surface (SF).

An eleventh aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the eleventh aspect, the image processing program further causes the computer (10,11b) to execute: a field of view determination step (S303) of determining whether or not each of the polygonal shape regions generated in the plane surface division step (S301, S311) is in an out-of-view region, which is not included in the image as viewed from the virtual camera (VP); and a region exclusion step (S305) of excluding a region, among the polygonal shape regions generated in the plane surface division step (S301, S311), which is determined to be in the out-of-view region in the field of view determination step (S303), from target regions which are subject to processing in the first distance reading step (S407), the first coordinate point calculation step (S409) and the polygon generation step (S411, S413, S415). Accordingly, since unnecessary processing can be eliminated, the polygons can be generated efficiently.

A twelfth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the twelfth aspect, the image processing program (40) further causes the computer (10,11b) to execute: a reference point setting step, an outer-circumference point setting step, a second distance reading step, a second coordinate point calculation step, a normal vector calculation step, and an average calculation step (S211, S213). The reference point setting step (S201) sets points on the virtual plane surface (PL), the points being interrelated to the distance information (41) and stored in the storage medium (11e,12), as reference points with respect to which normal vector information (42) is generated. The outer-circumference point setting step (S203) sets, on the virtual plane surface (PL), two points which are distanced from each reference point by a predetermined unit distance in a predetermined first direction (an X-axis direction), and sets another two points which are distanced from each reference point by the unit distance in a second direction (a Z-axis direction) which is perpendicular to the first direction. The second distance reading step (S205) reads, from the storage medium (11e,12), the distance information (41) on each reference point set in the reference point setting step (S201) and on the four points set in the outer-circumference point setting step (S203). The second coordinate point calculation step (S207) calculates coordinate points of positions which are respectively distanced from each reference point and the four points by distances indicated by the distance information (41) read in the second distance reading step (S205) in a direction perpendicular to the virtual plane surface (PL). The normal vector calculation step (S209) calculates normal vectors V1to V4of four triangle polygons, which each includes as vertices thereof, a point N0corresponding to each reference point, a point corresponding to either of the two points N3and N4which are distanced from each reference point in the first direction (the X-axis direction), and a point corresponding to either of the two points N1and N2which are distanced from each reference point in the second direction (the Z-axis direction), among the five coordinate points (N0to N4) calculated in the second coordinate point calculation step. The average calculation step (S211, S213) calculates an average value of the four normal vectors V1to V4calculated in the normal vector calculation step (S209), and interrelates the average value to information (an X-axis coordinate and a Z-axis coordinate) indicative of the position of each reference point on the virtual plane surface (PL) so as to be stored in the storage medium (11e,12). The polygon generation step (S411, S413, S415) includes a normal vector setting step (S413) of reading a normal vector from the storage medium (11e,12) and set the normal vector to each of the polygon vertices. Accordingly, even in the case where the number of divisions of the respective regions are changed due to a movement of the virtual camera (VP) or the like, a change in the normal vector of a polygon vertex can be minimized, and thus an image which never brings a sense of discomfort can be displayed.

A thirteenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the thirteenth aspect, the image processing program further causes the computer (10,11b) to execute a normal vector reading step (S413) of reading, from the storage medium (11e,12), normal vector information (42) indicative of a tilt of the curved surface (SF) at each of the coordinate points calculated in the first coordinate point calculation step (S409). The polygon generation step (S411, S413, S415) includes a normal vector setting step (S413) of setting the normal vector information (42) read in the normal vector reading step (S413) as the normal vector information (42) of each of the polygon vertices corresponding to each of the coordinate points. Accordingly, since processing for generating the normal vector information (42) is not necessary, an image which never brings a sense of discomfort can be displayed, efficiently.

A fourteenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the thirteenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the fourteenth aspect, in the storage means (11e,12), the normal vector information (42) is stored as image information such that positions and colors composing the image correspond to respective positions and normal vectors on the curved surface (SF), respectively. Accordingly, Since the normal vector information (42) can be stored efficiently, a capacity required for storing the normal vector information (42) can be reduced. In addition, the normal vector information (42) can be read efficiently.

A fifteenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the fifteenth aspect, in the storage means (11e,12), the distance information (41) is stored as image information such that positions and colors composing the image correspond to respective positions on the curved surface (SF) and distances from the virtual plane surface (PL), respectively (FIG. 16B). Accordingly, since the distance information (41) can be stored efficiently, the capacity required for storing the distance information (41) can be reduced. In addition, the distance information (41) can be read efficiently.

A sixteenth aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40) is based on the first aspect of the computer readable storage medium (11e) having stored thereon an image processing program (40). In the sixteenth aspect, the curved surface (SF) is a landform arranged in the virtual three-dimensional space. Accordingly, the polygons representing the landform can be generated appropriately.

The present invention is also directed to an image processing apparatus for an image of a curved surface (e.g., the landform) as viewed from a virtual camera (VP) situated in a virtual three-dimensional space, an undulation of the curved surface (SF) being defined by a distance from a virtual plane surface (PL) arranged in the virtual three-dimensional space. The image processing apparatus comprises: plane surface division means (10,11b) for dividing the virtual plane surface (PL) into a plurality of polygonal shape regions such that the closer a region is to the virtual camera (VP), the smaller areas the region is divided into; first distance reading means (10,11b) for reading, from storage means (11e,12), distance information (41) indicative of the distance from the virtual plane surface (PL), with respect to respective vertices of the plurality of polygonal shape regions; first coordinate point calculation means (10,11b) for calculating coordinate points of positions which are respectively distanced from each of the vertices composing the polygons corresponding to the plurality of polygonal shape regions by distances indicated by the distance information (41) read by the first distance reading means (10,11b) in a direction perpendicular to the virtual plane surface (PL); polygon generation means (10,11b) for generating polygons by using the coordinate points calculated by the first coordinate point calculation means (10,11b) as polygon vertices defining each of the polygons, the number of the polygons being substantially constant in each of the plurality of the polygonal shape regions; and drawing means (10,11b) for drawing an image of the polygons which are generated in the polygon generation step (10,11b), the image as being viewed from the virtual camera (VP).

According to the storage medium (11e) having stored thereon the image processing program (40) and the image processing apparatus (3) according to the present invention, when the image of the curved surface (SF) is to be generated, the undulation of the curved surface being defined by the distance from the virtual plane surface arranged in the virtual three-dimensional space, the closer the distance to the virtual camera (VP) is, the smaller areas the region is divided into. Further, substantially a common number of polygons are generated in each of the regions. Accordingly, it is possible to generate polygon information (44) which is capable of securing the quality of the image of the curved surface (SF) as viewed from the virtual camera (VP), and also capable of representing the curved surface (SF) which requires a small (i.e., appropriate) storage capacity.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

(Overall Configuration of Game System)

With reference toFIG. 1, a game system1including a game apparatus according to one embodiment of the present invention will be described.FIG. 1is an external view of the game system1. Hereinafter, a stationary game apparatus will be descried as an example of the game apparatus and a game program of the present embodiment. As shown inFIG. 1, the game system1includes a television receiver (hereinafter simply referred to as a “television”)2, a game apparatus3, an optical disc4, a marker section6, and a controller7. In the present system, a game process is executed on the game apparatus3in accordance with a game operation using the controller7.

To the game apparatus3(which corresponds to an image processing apparatus), the optical disc4is detachably inserted. The optical disc4is an exemplary information storage medium exchangeably used for the game apparatus3. A game program to be executed on the game apparatus3is stored on the optical disc4. On a front surface of the game apparatus3, an insertion slot for receiving the optical disc4is provided. When the optical disc4is inserted into the insertion slot, the game apparatus3reads and executes the game program stored on the optical disc4thereby executing the game process.

To the game apparatus3, the television2, which is an exemplary display device, is connected via a connection cord. A game image, which is obtained as a result of the game process executed on the game apparatus3, is displayed on the television2. On the periphery of a screen of the television2(at a portion above the screen shown inFIG. 1), the marker section6is located. The marker section6has two markers6R and6L at both ends thereof. The marker6R (as well as6L) is configured with one or more infrared LEDs, and outputs an infrared radiation forward from the television2. The marker section6is connected to the game apparatus3, and the game apparatus3is capable of controlling lighting of each of the infrared LEDs provided to the marker section6.

The controller7is an input device for providing the game apparatus3with operation data indicative of an operation performed with respect to the controller7. The controller7and the game apparatus3are connected to each other via wireless communication. In the present embodiment, the wireless communication between the controller7and the game apparatus3is performed by using a technique of Bluetooth (registered trademark), for example. In another embodiment, the controller7and the game apparatus3may be connected to each other via a cable.

(Internal Configuration of Game Apparatus3)

With reference toFIG. 2, an internal configuration of the game apparatus3will be described.FIG. 2is a block diagram showing a configuration of the game apparatus3. The game apparatus3includes a CPU10, a system LSI11, an external main memory12, a ROM/RTC13, a disc drive14, an AV-IC15and the like.

The CPU10executes the game program stored on the optical disc4, thereby executing the game process. That is, the CPU10functions as a game processor. The CPU10is connected to the system LSI11. In addition to the CPU10, the external main memory12, the ROM/RTC13, the disc drive14, and the AV-IC15are connected to the system LSI11. The system LSI11performs processing such as control of data transmission among respective component parts connected thereto, generation of an image to be displayed, and acquisition of data from an external apparatus. An internal configuration of the system LSI will be described later. The external main memory12, which is of a volatile type, stores therein programs such as the game program read from the optical disc4, the game program read from a flash memory17, and various data. The external main memory12is used as a work area and a buffer space for the CPU10. The ROM/RTC13includes a ROM (so-called a boot ROM) incorporating a program for starting up the game apparatus3, and a clock circuit (RTC: Real Time Clock) for counting time. The disc drive14reads program data, texture data and the like from the optical disc4, and writes the read data into an internal main memory11edescribed later or the external main memory12.

Further, provided to the system LSI11are an input/output (I/O) processor11a, a GPU (Graphics Processor Unit)11b, a DSP (Digital Signal Processor)11c, a VRAM11d, and the internal main memory11e. Although not shown in diagrams, these component parts11ato11eare connected to one another via an internal bus.

The GPU11bforms a part of drawing means and generates an image in accordance with a graphics command (draw command) from the CPU10. The VRAM11dstores therein data (such as polygon data and texture data) necessary for the GPU11bto execute the graphics command. When an image is to be generated, the GPU11buses data stored in the VRAM11dand generates the image data.

The DSP11cfunctions as an audio processor, and generates audio data by using sound data and sound waveform (tone quality) data stored in the internal main memory11eand the external main memory12.

The image data and the audio data generated as above described are read by the AV-IC15. The AV-IC15outputs the read image data to the television2via the AV connector16, and also outputs the read audio data to the loudspeakers2aembedded in the television2. Accordingly, the image is displayed on the television2and the sound is outputted from the loudspeakers2a.

I/O processor11aexecutes transmission of data among component pats connected thereto, and also executes download of data from an external apparatus. The I/O processor11ais connected to the flash memory17, the wireless communication module18, the wireless controller module19, an extension connector20, and a memory card connector21. An antenna22is connected to the wireless communication module18, and an antenna23is connected to the wireless controller module19.

The I/O processor11ais connected to a network via the wireless communication module18and the antenna22, and is capable of communicating with another game apparatus and various serves connected to the network. The I/O processor11aaccesses the flash memory17at regular intervals so as to detect data, if any, which is necessary to be transmitted to the network. If the data is detected, the detected data is transmitted to the network via the wireless communication module18and the antenna22. Further, the I/O processor11areceives data transmitted from another game apparatus and data downloaded from a download server via the network, the antenna22and the wireless communication module18, and stores the received data in the flash memory17. The CPU10executes the game program, and reads the data stored in the flash memory17so as to be used on the game program. In the flash memory17, not only data transmitted between the game apparatus3and another game apparatus or various servers, but also save data of a game (result data or midstream data of a game) played by using the game apparatus3may be stored.

The I/O processor11areceives operation data transmitted from the controller7via the antenna23and the wireless controller module19, and (temporarily) stores the operation data in the internal main memory11eor in the buffer space of the external main memory12.

The extension connector20and the memory card connector21are connected to the I/O processor11a. The extension connector20is an interface connector as typified by a USB and an SCSI, and is capable of performing communication with the network, instead of the wireless communication module18, by connecting thereto a medium such as an external storage medium, a peripheral device such as another controller, or a wired communication connector. The memory card connector21is a connector for connecting thereto the external storage medium such as a memory card. For example, the I/O processor11aaccesses the external storage medium via the extension connector20and the memory card connector21, and then saves data or reads data.

To the game apparatus3, a power button24, a reset button and an eject button are provided. The power button24and the reset button25are connected to the system LSI11. When the power button24is turned on, power is supplied to each of the component parts of the game apparatus3via an AC adaptor, which is not shown. When the reset button25is pressed, the system LSI11reactivates the start-up program of the game apparatus3. The eject button26is connected to the disc drive14. When the eject button26is pressed, the optical disc4is ejected from the disc drive14.

With reference toFIGS. 3 and 4, the controller7will be described.FIG. 3is a perspective view of the controller7as viewed from a top rear side thereof.FIG. 4is a perspective view of the controller7as viewed from a bottom front side thereof.

As shown inFIGS. 3 and 4, the controller7includes a housing71, which is formed by, for example, plastic molding, and a plurality of operation sections is provide on the housing71. The housing71has a substantially parallelepiped shape extending in a longitudinal direction from front to rear, and an overall size thereof is small enough to be held by one hand of an adult or even a child.

At a front center portion of a top surface of the housing71, a cross key72ais provided. The cross key72ais a cross-shaped four direction push switch, and the operation portions thereof are respectively located on cross-shaped projecting portions arranged at intervals of 90 degrees such that the operation portions correspond to four directions (front, rear, right and left). A player selects one of the front, rear, left and right directions by pressing one of the operation portions of the cross key72a. Through an operation of the cross key72a, the player can, for example, indicate a direction in which a player character or the like appearing in a virtual game world is to move, or select an instruction from a plurality of choices.

The cross key72ais an operation section for outputting an operation signal in accordance with the direction input operation performed by the player. The operation section may be provided in another form. For example, the operation section may be provided such that four push switches are arranged in the cross directions and an operation signal is outputted by the player's pressing one of the four push switches. Further, in addition to the four push switches, a center switch may be provided at a crossing position of the above-described cross directions so as to provide an operation section composed of the four push switches and the center switch. Alternatively, the cross key72amay be replaced with an operation section which includes an inclinable stick (so-called a joystick) projecting from the top surface of the housing and which outputs the operation signal in accordance with an inclining direction of the stick. Still alternatively, the cross key72amay be replaced with an operation section which includes a disc-shaped member horizontally slidable and which outputs an operation signal in accordance with a sliding direction of the disc-shaped member. Still alternatively, the cross key72amay be replaced with a touchpad.

Behind the cross key72aon the top surface of the housing71, a plurality of operation buttons72b,72c,72d,72e,72fand72gis provided. The operation buttons72b,72c,72d,72e,72fand72gare each an operation section for outputting an operation signal assigned thereto when the player presses a head thereof. For example, functions such as a No. 1 button, a No. 2 button and A button and the like are assigned to the operation buttons72b,72cand72d. Further, functions such as a minus button, a home button, a plus button and the like are assigned to the operation buttons72e,72fand72g. Various operation functions are assigned to these operation buttons72a,72b,72c,72d,72e,72fand72gin accordance with the game program executed by the game apparatus3. In an exemplary arrangement shown inFIG. 3, the operation buttons72b,72cand72dare arranged in a line at the center in a front-rear direction on the top surface of the housing71. Further, the operation buttons72e,72f, and72gare arranged in a line on the top surface of the housing71in a left-right direction between the operation buttons72band72d. The operation button72fhas a top surface thereof buried in the top surface of the housing71so as not to inadvertently pressed by the player.

In front of the cross key72aon the top surface of the housing71, an operation button72his provided. The operation button72his a power switch for turning on and off the power to the game apparatus3by remote control. The operation button72halso has a top surface thereof buried in the top surface of the housing71, so as not to be inadvertently pressed by the user.

Behind the operation button72con the top surface of the housing71, a plurality of LEDs702is provided. A controller type (number) is assigned to the controller7such that the controller7is distinguishable from another controller7. The LEDs702are used for, for example, informing the player of the controller type set for the controller7. Specifically, when data is transmitted from the controller7to the wireless communication module18, a LED corresponding to the controller type is turned on among the plurality of LEDs702.

On the top surface of the housing71, sound holes for emitting a sound from a loudspeaker (the loudspeaker706shown inFIG. 5), which is described later, are formed between the operation button72band the operation buttons72e,72fand72g.

On a button surface of the housing71, a recessed portion is formed. The recessed portion on the bottom surface of the housing71is formed in a position in which an index finger or middle finger of the player is located when the player holds the controller7with one hand and points a front portion thereof to the markers6L and6R. On a slope surface of the recessed portion, an operation button72iis provided. The operation button72iis an operation section acting as, for example, a B button.

On a front surface of the housing71, an image pickup element743constituting a part of an imaging information calculation section74is provided. The imaging information calculation section74is a system which analyzes image data picked up by the controller7, identifies an area having high brightness in the image, and detects a position of a gravity center, a size and the like of the area. The imaging information calculation section74has, for example, a maximum sampling period of about 200 frames/sec., and thus can trace and analyze even a relatively fast motion of the controller7. A configuration of the imaging information calculation section74will be described later in detail. On a rear surface of the housing71, a connector73is provided. The connector73is, for example, an edge connector, and is used for coupling and connecting the controller with a connection cable.

For the same of specific explanation, a coordinate system set with respect to the controller7will be defined. As shown inFIGS. 3 and 4, an X-axis, a Y-axis, and Z-axis which are perpendicular to one another are defined with respect to the controller7. Specifically, the longitudinal direction of the housing71corresponding to the front-rear direction of the controller7is defined as a Z-axis direction, and a direction toward the front surface (a surface on which the imaging information calculation section74is mounted) of the controller7is a Z-axis positive direction. The up-down direction of the controller7is defined as a Y-axis direction, and a direction toward the bottom surface (a surface on which the operation button72iis provided) of the housing71is defined as a Y-axis positive direction. The left-right direction of the controller7is defined as an X-axis direction, and a direction toward the left side surface (a side surface which is not shown inFIG. 3) of the housing71is defined as an X-axis positive direction.

With reference toFIGS. 5 and 6, an internal configuration of the controller7will be described.FIG. 5is a perspective view of the controller7in a state where an upper housing (a part of the housing71) thereof is removed.FIG. 6is a perspective view of the controller7in a state where a lower housing (a part of the housing71) thereof is removed.FIG. 6is a perspective view as viewed from a reverse side of a substrate700shown inFIG. 5.

As shown inFIG. 5, the substrate700is fixed inside the housing71. Provided on a top main surface of the substrate700are the operation buttons72a,72b,72c,72d,72e,72f,72gand72h, an acceleration sensor701, the LEDs702, an antenna754and the like. These component parts are connected to a microcomputer751and the like (seeFIGS. 6 and 7) by lines (not shown) formed on the substrate700and the like. The wireless module753(seeFIG. 7) and the antenna754allow the controller7to act as a wireless controller. A quartz oscillator, which is not shown, is provided in an inside of the housing71, and generates a reference clock of the microcomputer751described later. On the top main surface of the substrate700, the loudspeaker706and an amplifier708are provided. The acceleration sensor701is provided at the left side of the operation button72don the substrate700(that is, at a peripheral portion, instead of a center portion, on the substrate700). Accordingly, the acceleration sensor701can detect, in accordance with a rotation centering on the longitudinal direction of the controller7, acceleration caused by a centrifugal force element as well as directional variation in gravitational acceleration. Therefore, based on a predetermined calculation, the game apparatus3and the like can detect, from the detected acceleration data, the rotation of the controller7highly sensitively.

As shown inFIG. 6, at a front edge of a bottom main surface of the substrate700, the imaging information calculation section74is provided. The imaging information calculation section74includes an infrared filter741, a lens742, the image pick up element743, and an image processing circuit744, which are located in this order from the front side of the controller7, and provided on the bottom main surface of the substrate700. At a rear edge of the bottom main surface of the substrate700, the connector73is attached. Further, on the bottom main surface of the substrate700, a sound IC707and the microcomputer751are provided. The sound IC707is connected to the microcomputer751and the amplifier708by lines formed on the substrate700or the like, and outputs an audio signal to the loudspeaker706via the amplifier708in accordance with the audio data transmitted from the game apparatus3.

On the bottom main surface of the substrate700, a vibrator704is attached. The vibrator704may be, for example, a vibration motor or a solenoid. The vibrator704is connected to the microcomputer751via the lines formed on the substrate700or the like, and an operation thereof is turned on/off in accordance with vibration data transmitted from the game apparatus3. The controller7is vibrated when the vibrator704is turned on, and vibration is conveyed to the player holding the controller7. Thus, so-called a vibration-feedback game is realized. The vibrator704is locate data relatively front side of the housing71, and thus the housing71vibrates to a large extent while the player is holding the housing71, whereby the player feels vibration sensitively.

With reference toFIG. 7, an internal configuration of the controller7will be described.FIG. 7is a block diagram showing a configuration of the controller7.

As shown inFIG. 7, the controller7includes thereinside a communication section75, in addition to the above-described operation section72, the imaging information calculation section74, the acceleration sensor701, the vibrator704, the loudspeaker706, the sound IC707, and the amplifier708.

The imaging information calculation section74includes the infrared filter741, the lens742, the image pickup element743and the image processing circuit744. The infrared filter741allows only an infrared radiation to pass therethrough, the infrared radiation being included in the light which is incident on the front side of the controller7. The lens742converges the infrared radiation which has passed through the infrared filter741, and outputs the infrared radiation to the image pickup element743. The image pickup element743is a solid-state image pickup element such as a CMOS sensor or a CCD, and picks up an image of the infrared radiation converged by the lens742. In other words, the image pickup element743picks up the image of only the infrared radiation having passed through the infrared filter741, and generates image data. The image data generated by the image pickup element743is processed by the image processing circuit744. Specifically, the image processing circuit744processes the image data obtained from the image pickup element743and detects a high brightness point thereof, and outputs, to the communication section75, an process result data indicative of a result of the detection of the position coordinate and an area of the high brightness point. The imaging information calculation section74is fixed on the housing71of the controller7, and an imaging direction of the housing71can be changed by changing an orientation of the housing71.

The communication section75includes the microcomputer751, a memory752, the wireless module753and the antenna754. The microcomputer751controls the wireless module753for wirelessly transmitting the transmission data by using the memory752as a storage area at the time of processing. Further, the microcomputer751controls operations of the sound IC707and the vibrator704in accordance with the data received by the wireless module753from the game apparatus3via the antenna754. The sound IC707processes the sound data and the like transmitted from the game apparatus3via the communication section75. Further, the microcomputer751actuates the vibrator704in accordance with the vibration data (e.g., a signal for turning the vibrator704ON or OFF) or the like which is transmitted from the game apparatus3via the communication section75.

Data from the controller7such as an operation signal (key data) from the operation section72, acceleration signals (acceleration data in X, Y, and Z-axes directions) in three axes directions from the acceleration sensor701, and the process result data from the imaging information calculation section74are outputted to the microcomputer751. The microcomputer751temporarily stores the inputted data (the key data, the acceleration data in the X, Y, and Z-axes directions, and the process result data) in the memory752as the transmission data to be transmitted to the wireless communication module18. The wireless transmission from the communication section75to the wireless communication module18is performed at predetermined time intervals. Since the game process is generally performed at an interval of 1/60 sec., the wireless transmission needs to be performed at the interval of a shorter time period. Specifically, the game process is performed at the interval of 16.7 ms ( 1/60 sec.), and the transmission interval of the communication section75, which is configured with the Bluetooth (registered trademark), is 5 ms. At a timing of performing a transmission to the wireless communication module18, the microcomputer751outputs the transmission data stored in the memory752to the wireless module753as a series of pieces of operation information. Based on the Bluetooth (registered trademark) technology, for example, the wireless module753emits, from the antenna754, a radio signal indicative of the operation information by using a carrier wave having a predetermined frequency. Thus, the key data from the operation section72, the acceleration data in the X, Y, and Z-axes directions from the acceleration sensor701, and the process result data from the imaging information calculation section74are transmitted from the controller7. The radio signal is received by the wireless communication module18of the game apparatus3, and the radio signal is then demodulated or decoded in the game apparatus3, whereby the series of pieces of operation information (the key data, the acceleration data in the X, Y, and Z-axes directions, and the process result data) are obtained. The CPU10of the game apparatus3performs the game process in accordance with the obtained operation information and in accordance with the game program. In the case where the communication section75is configured with the Bluetooth (registered trademark) technology, the communication section75may have a function of receiving transmission data which is wirelessly transmitted from other devices.

The above-described hardware configuration is merely an example, and the present invention is applicable to any computer system. For example, the present invention is applicable to a computer system in which the game apparatus3is replaced by a personal computer.

Next, an outline of the image processing performed by the game apparatus3will be described. As a feature of the present invention, an image of a curved surface (a landform in the present embodiment) as viewed from a virtual camera situated in the virtual three-dimensional space is drawn, an undulation of the curved surface being defined by a distance from a virtual plane surface arranged in a virtual three-dimensional space. A type of the curved surface drawable by using the present invention is not limited to the landform. For example, the curved surface may be one side surface (e.g., a top side surface) of an object (such as a building) arranged in the virtual three-dimensional space.

Further, in the present embodiment, a polygon model indicative of the landform is generated, and an image is drawn on the television2shown inFIG. 1based on the generated polygon model. The polygon model undergoes texture mapping, and a texture image indicative of a pattern of the ground surface, for example, is mapped onto the polygon model as necessary. In the following description, description of the texture mapping processing will be omitted for convenience.

With reference toFIGS. 8 to 12, plane surface division processing (i.e., processing executed in a “plane surface division step”, and processing executed by “plane surface division means”) will be described. In the plane surface division processing, the virtual plane surface arranged in the virtual three-dimensional space is divided, in accordance with a distance from the virtual camera situated in the virtual three-dimensional space, into a plurality of regions each composed of a polygonal shape having three or more predetermined number of vertices.FIG. 8AandFIG. 8Bare schematic diagrams showing exemplary processing (i.e., the processing executed in a “first division step”) of dividing a virtual plane surface PL into a first predetermined number (four in this case) of regions.FIG. 8Ais a diagram showing the virtual plane surface before the division, whereasFIG. 8Bis a diagram showing the virtual plane surface after the division.

As shown inFIG. 8A, in the virtual three-dimensional space, the X-axis, the Y-axis, and the Z-axis are defined so as to represent a left-right direction, an up-down direction, and a front-rear direction of the diagram, respectively. A quadrangular (a square, in this case) virtual plane surface PL is situated on a X-Z plane surface. In the present embodiment, an undulation of the landform SF to be drawn on the television2(seeFIG. 14A) is defined by a distance (i.e., a distance corresponding to a Y coordinate) thereof from the virtual plane surface PL shown inFIG. 8. Further, a position and an orientation of the virtual camera VP are set in accordance with an instruction from the controller7shown inFIG. 1, and in this case, the virtual camera VP is situated above a substantially central portion of the virtual plane surface PL (in the Y-axis positive direction) while facing the Z-axis positive direction.

Further, a viewing angle VA (i.e., an angle indicative of a range virtually taken by the virtual camera VP) of predetermined degrees (e.g., 110°) is set to the virtual camera VP. As shown inFIG. 8B, the virtual plane surface PL is equally divided, by two straight lines DL11and DL12which are each formed by connecting middle points between facing two sides of the virtual plane surface PL, into a first predetermined number (four in this case) of regions PL11to PL14.

In the present embodiment, a case where the virtual plane surface PL is a square region is described. However, a region having another shape (such as a rectangle, a circle and the like) may be applicable. Further, in the present embodiment, a case where the virtual plane surface PL is divided into four regions PL11to PL14is described. However, the virtual place surface PL may be divided into two or more first predetermined number (e.g., 16 or the like) of regions, instead of four. If the greater the first predetermined number is, the less the number of times the region is divided.

FIG. 9AandFIG. 9Bare schematic diagrams showing exemplary processing (so-called clipping processing) of excluding a region, which is outside a field of view of the virtual camera VP, from the processing target regions (i.e. processing executed in a “field of view determination step” and in a “region exclusion step”). The regions PL11to PL14shown inFIG. 8Bare each divided into the first predetermined number of regions (four in the present embodiment) as shown inFIG. 9A(i.e., a total of 16 regions are generated). For example, the region PL11is equally divided into four regions PL21to PL24by two straight lines DL21and DL22, which are each formed by connecting middle points between two facing sides of the region PL11. Among the four regions PL21to PL24, three regions PL21, PL22and PL24, which are each hatched, fall outside the field of view of the virtual camera VP (hereinafter referred to as out-of-view regions), and consequently, processing is performed so as to exclude the three regions from the target regions to be processed thereafter.

Among 16 regions shown inFIG. 9A, regions (i.e., 10 regions) excluding 6 out-of-view regions including the regions PL21, PL22and PL24are equally divided into the first predetermined number of regions (four in the present embodiment), respectively, as shown inFIG. 9B(i.e., a total of 40 regions are generated). For example, the region PL23shown inFIG. 9Ais equally divided into four regions PL31to PL34by two straight lines DL31and DL32which are each formed by connecting middle points between two facing sides of the region PL23. Among the generated four regions PL31to PL34, two of the regions PL31and PL34, which are each hatched, fall outside the field of view of the virtual camera VP, and thus processing is performed so as to exclude the regions PL31and PL34from the target regions to be processed thereafter. In this manner, the respective regions are each equally divided into four regions by two straight lines which are each formed by connecting middle points between two facing sides of the region, and thus the virtual plane surface PL can be divided efficiently with simple processing. Further, the out-of-view regions are excluded from the target regions to be processed thereafter, and thus a processing load can be reduced.

In the present embodiment, a case is described where each of the regions is equally divided into four regions in sequence. However, instead of four, each of the regions may be divided into the first predetermined number (e.g. 16 and the like) of regions. The greater the first predetermined number is, the less number of times each of the regions is divided (i.e., processing time can be reduced). On the other hand, if the first predetermined number is less, it is possible to generate a polygon model which is capable of creating an image having a uniform image quality.

FIG. 10AandFIG. 10Bare schematic diagrams showing exemplary processing (i.e., processing executed in a “size evaluation value calculation step”) of calculating a size evaluation value used for determining whether or not the region needs to be divided or not. In the plane surface division processing, the closer the distance to the virtual camera VP is, the smaller areas the region needs to be divided into. Specifically, the size evaluation value indicative of a size of an image of each region as viewed from the virtual camera VP is calculated, and each region is divided such that the calculated size evaluation value thereof is equal to or lower than a predetermined threshold value.

As shown inFIG. 10A, when the virtual plane surface PL is divided, the size evaluation value of a region PLA is calculated as follows. A sphere BA, whose great circle is a circle circumscribing a square corresponding to the region PLA, is virtually generated. An area of an image (FIG. 10B) of the generated sphere BA, as viewed from the virtual camera VP, is calculated as the size evaluation value of the region PLA (the area corresponding to the number of pixels on a screen of the television2shown inFIG. 1).

The present embodiment exemplifies the case where the size evaluation value corresponds to the area of the image of the sphere as viewed from the virtual camera VP, the sphere having the great circle circumscribing the square corresponding to one of the divided regions. However, the size evaluation value may correspond to an area of a sphere as viewed from the virtual camera VP, the sphere having the great circle inscribing the square corresponding to the region. Further, the size evaluation value may be any value as long as the size evaluation value corresponds to the size of the image of the divided region as viewed from the virtual camera VP. For example, the size evaluation value may be the distance between the divided region and the virtual camera VP.

FIG. 11AandFIG. 11Bare a schematic diagrams showing exemplary re-division processing (i.e., processing executed in a “re-division step”) and exemplary triangle generation processing (i.e., processing executed in a “triangle generation step”). In the plane surface division processing, division is repeatedly performed until the size evaluation values of all the regions become equal to or lower than the predetermined threshold values, and then the re-division processing is executed. In the re-division processing, each of the generated regions is further divided into small regions which are composed of a second predetermined number (36 in the present embodiment) of square regions.FIG. 11Ais a diagram showing a result of divisions which are repeatedly performed until the size evaluation values of all the regions become equal to or lower than the predetermined threshold values. As shown in the diagram, through the plane surface division processing, a region PLN, which is close to the virtual camera VP, is (finely) divided into relatively small regions, whereas regions PLA and PLB, which are distanced from the virtual camera VP are (roughly) divided into relatively large regions. In the re-division processing, each of the regions including the regions PLN, PLA and PLB, shown inFIG. 11A, are equally divided into 6 small regions in two directions along two adjacent sides of each of the regions, respectively, thereby generating, equally, 36 small regions (seeFIG. 11B), which are each of a square shape.

In this manner, through the re-division processing, it is possible to efficiently generate polygons having appropriate sizes so as to represent the curved surface SF. That is, in the plane surface division processing, the virtual plane surface PL is divided into regions having appropriate sizes in accordance with the size evaluation value, and in the re-division processing, each of the regions is equally divided into the second predetermined number (36 in the present embodiment) of small regions, whereby the polygons having appropriate sizes can be generated efficiently.

The present embodiment is exemplified by the case where, in the re-division processing, each of the regions is divided into 36 small regions. However, each of the regions may be divided into an even number (e.g., 4, 8 and the like) of small regions, respectively, in the two directions along adjacent sides of each of the regions. In the case where each of the regions is divided into an odd number of small regions, respectively, in the two directions along adjacent side of each of the regions, polygons cannot be connected to each other smoothly as shown inFIG. 12.

In the triangle generation processing, each of the small regions, which is of a quadrangular shape (square in this case) and is generated in the re-division step, is divided diagonally into two triangles, and two triangle polygons corresponding to the two triangles are generated. As with the regions PLA and PLB shown inFIG. 11A, when regions having different sizes are adjacent to each other, the regions need to be divided into the triangle regions respectively, in the triangle generation processing, such that polygons corresponding thereto can be connected to one another smoothly.

Specifically, as shown inFIG. 11B, in the triangle generation processing, extracted are outer-circumference small regions (i.e., small regions each including at least one of vertices N11to N17, N21to N71, N72to N77, and N27to N67) which are each of a square shape and includes, as at least one side thereof, a part of a side composing one of the square regions generated in the plane surface division processing (i.e., an “outer-circumference extraction step” is executed). Among the extracted outer-circumference small regions, in the case of the outer-circumference small regions which each includes vertices (the vertices N11, N17, N71and N77in the present embodiment) composing the one of the square regions generated in the plane surface division processing, diagonal lines including the vertices (the vertices N11, N17, N71and N77) are selected as diagonal lines for divining the squares composing the outer-circumference small regions. On the other hand, if the outer-circumference small regions does not include the vertices (the vertices N11, N17, N71and N77) composing the square region generated in the plane surface division processing, diagonal lines are selected, as diagonal lines for dividing the squares composing the outer-circumference small regions, such that diagonal lines of adjoining outer-circumference small region are substantially perpendicular to one another (i.e., such that the diagonal lines forms a zigzag line) (a “diagonal line selection step” is executed).

In the present embodiment, a case is described where72triangle regions having a pattern shown inFIG. 11Bare generated from all the regions generated in the plane surface division processing (seeFIG. 11A). In this case, the above-described triangle generation step, which includes the “outer-circumference extraction step” and the “diagonal line selection step”, does not need to be executed for all the regions, and thus the processing is simplified. In another embodiment, the triangle regions may be generated by executing the triangle generation step, which includes the “outer-circumference extraction step” and the “diagonal line selection step”, for all the regions generated in the plane surface division processing.

FIG. 12is a diagram showing an exemplary polygon connection state in the case where regions having different sizes are adjacent to one another. For example, as shown inFIG. 11B, in the case where the triangle generation processing is performed with respect to each of the regions PLA and PLB shown inFIG. 11A, processing is performed so as to remove vertices N12, N14and N16of the region PLB as shown inFIG. 12, whereby polygons are connected to one another smoothly with simple processing.

The present embodiment exemplifies the case where each of the small regions is divided into the triangle regions, as shown inFIG. 11B, in the triangle generation processing. However, the small regions other than the outer-circumference small regions may be divided into any manner. InFIG. 11B, the small regions other than the outer-circumference small regions are each divided by a diagonal line of a negative slope. However, the small regions may be each divided by a diagonal line of a positive slope.

InFIG. 11, the case is described where, from each of the regions generated in the plane surface division processing, the outer-circumference small regions are extracted and then the diagonal line selection processing is performed. In the present embodiment, the case is described where each of the regions generated in the plane surface division processing is divided into 72 triangle regions as shown inFIG. 11B, whereby the triangle generation processing is executed. That is, in the present embodiment, each of the regions generated in the plane surface division processing is divided into predetermined 72 triangle regions (seeFIG. 11B). In this manner, the predetermined triangle regions are generated, and thus the processing is simplified.

Next, with reference toFIGS. 13 and 14, the first distance reading processing, first coordinate point calculation processing, and polygon generation processing will be described. First, with reference toFIG. 13, the first distance reading processing will be described. In the first distance reading processing (i.e., processing executed in a “first distance reading step”, and processing executed by “first distance reading means”), distance information indicative of distances from the virtual plane surface PL is read from the internal main memory11ewith respect to vertices (the vertices N11to N77and the like shown inFIG. 11B)) of respective polygonal shapes (the triangles shown inFIG. 11B, in this case) of the regions generated in the plane surface division processing.

FIG. 13AandFIG. 13Bare diagrams showing an exemplary correspondence between a distance-containing image PM and a virtual plane surface PL.FIG. 13Ais an image showing an exemplary distance-containing image PM which is image information in which positions and colors of respective points composing the distance-containing image correspond, respectively, to positions of respective points on the curved surface SF and distances of the respective points from the virtual plane surface PL (seeFIG. 14A). The positions of the respective points composing the distance-containing image PM shown inFIG. 13Acorrespond to the positions in the virtual plane surface PL shown inFIG. 8A, and the colors (contrasting represented by 8 bits (256-level gray scales) using an α value of the image information) of the respective points correspond to the distance information. In the present embodiment, the higher the curved surface SF is (i.e., the farther the distance from the virtual plane surface PL is), the whiter the image is. The landform SF represented by the distance-containing image PM shown inFIG. 13Ahas a gourd-shaped mountain approximately at a central portion of the virtual plane surface PL, and also has two small mountains at the rear side of the gourd-shaped mountain (seeFIG. 14A).

FIG. 13Bis a diagram showing an exemplary interrelation between the distance-containing image PM shown inFIG. 13A(in the diagram, the distance-containing image PM is displayed in a semi-transparent manner after being subject to semi-transparency processing) and the virtual plane surface PL (the regions shown inFIG. 11A). As shown inFIG. 13B, in the first distance reading processing, the vertices (the vertices N11to N77shown inFIG. 11B) composing the triangle regions (seeFIG. 11B, the triangle regions not shown inFIG. 13for convenience) are caused to correspond to the distance-containing image PM shown inFIG. 13A, whereby the distance information is read based on the α value of the distance-containing image PM, the triangle regions being generated in the re-division processing of the regions which are shown inFIG. 11Aand which are generated by dividing the virtual plane surface PL in the plane surface division processing.

In the first distance reading processing, an x coordinate and a Z coordinate are calculated with respect to each of the vertices composing the triangle regions (not shown), which are generated byre-dividing the square regions (seeFIG. 13B) which are generated by dividing the virtual plane surface PL. The α value of the distance-containing image PM (seeFIG. 13B) corresponding to the calculated X coordinate and Z coordinate is read, and a distance corresponding to the read α value is calculated, whereby the distance information is obtained.

In this manner, the positions of the respective points, which compose the distance-containing image PM stored in the internal main memory11e, correspond to the positions on the virtual plane surface PL, and the colors (contrasts represented by 8 bits (256-level gray scales) using the α value of the image information) of the respective points correspond to the distance information. Therefore, the distance information indicative of the curved surface SF can be stored efficiently. Consequently, a capacity required for storing the distance information41(seeFIG. 17) can be reduced, and the distance information can be read efficiently.

In the present embodiment, a case where the distance information is stored as the α value of the image information is described. However, the distance information may be stored as another color information (e.g., any of RGB color information) corresponding to pixels composing the distance-containing image. Further, the distance information may be stored in a form other than the image information (e.g., in a form of matrix in which the distance information corresponds to vertex position information). Still further, in the present embodiment, the case where the distance-containing image PM is stored in the internal main memory11eis described. However, the distance-containing image PM may be stored in another storage means (e.g., the flash memory17or the like).

Next, with reference toFIG. 14, the first coordinate point calculation processing and the polygon generation processing will be described. In the first coordinate point calculation processing (i.e., processing executed in a “first coordinate point calculation step” and processing executed by “first coordinate point calculation means”), each of the vertices (the vertices N11to N77and the like shown inFIG. 11B) composing the polygonal shapes (i.e., the triangles shown inFIG. 11B), which corresponds to the regions generated in the plane surface division processing, is moved in parallel to a position in a direction (i.e., the Y-axis direction) perpendicular to the virtual plane surface PL by a distance indicated by the distance information read in the first distance reading processing, and then a coordinate point of the position is calculated.

In the polygon generation processing (i.e., processing executed in a “polygon generation step” and processing executed by “polygon generation means”), the position corresponding to the coordinate point calculated in the first coordinate point calculation processing is used as a polygon vertex which defines a polygon, and polygons corresponding to the curved surface SF is generated.

FIG. 14AandFIG. 14Bare diagrams showing an exemplary relation of the curved surface SF, which is represented by the polygon model, with the distance-containing image PM and the virtual plane surface PL.FIG. 14Ais a general view, andFIG. 14Bis an enlarged view of a circumference of one region PLC which is generated in the plane surface division processing. Although not shown inFIG. 14, each of the square regions (e.g., the region PLC) generated in the plane surface division processing is divided into 72 triangle regions (seeFIG. 11B).

As shown inFIG. 14, in the first coordinate point calculation processing, each of the vertices composing the triangle regions generated in the plane surface division processing is moved in parallel to the position in the direction (the Y-axis direction) perpendicular to the virtual plane surface PL by the distance indicated by the distance information (the distance information corresponding to the α value of the distance-containing image PM) read in the first distance reading processing, which is described with reference toFIG. 13, and the coordinate point of the moved position is calculated. For example, a position (indicated with a white circle shown inFIG. 14B) of each of the vertices composing72triangle regions (not shown) included in the region PLC is moved in parallel in the Y-axis direction by a distance indicated by the distance information, and a coordinate point of the moved position (i.e., a coordinate point of each of the polygon vertices included in each of the 72 triangle polygons composing the polygon model of the curved surface SF) is calculated.

As shown inFIG. 14, in the polygon generation processing, the point (indicated by the white circle shown inFIG. 14B) corresponding to the coordinate point calculated in the first coordinate point calculation processing is used as each of the polygon vertices defining vertices of the polygons, and the polygons corresponding to the curved surface SF are generated. For example, 72 triangle polygons SFC are generated as polygons corresponding to the 72 triangle regions (not shown) in the region PLC.

In this manner, with respect to each of the regions generated in the plane surface division processing, the polygons corresponding to the 72 triangle regions are generated, and thus polygons having appropriate sizes are efficiently generated so as to represent the curved surface SF. In other words, in the plane surface division processing, the size of each of the regions is determined so as to define the size of each of the polygons, and in the polygon generation processing, 72 (i.e., the second predetermined number (36)×2 of) triangle polygons corresponding to the respective regions are generated. Accordingly, the polygons having the appropriate sizes are generated efficiently so as to represent the curved surface SF.

With reference toFIGS. 15 and 16, the normal vector image generation processing will be described.FIG. 15A andFIG. 15B are a diagram showing an exemplary relation between a normal vector and the polygon. The normal vector of a polygon vertex is calculated as an average value of the normal vectors of the polygon which includes the polygon vertex. Further, the normal vector of the polygon vertex is used for shading when an image of the curved surface SF (seeFIG. 14) represented by the polygons is generated.

On the other hand, as described with reference toFIGS. 8 to 12, in the present invention, the virtual plane surface PL is divided in accordance with the distance from the virtual camera VP, and thus, regions in the vicinity of the virtual camera VP, among the regions generated in the virtual plane surface PL, may be divided in the plane surface division processing. When a region is divided in the plane surface division processing, triangle regions included in the region are also divided, and consequently, the triangle polygons in the region are divided, respectively.

For example, as shown inFIG. 15A, suppose a case where three polygon vertices NA1, NA3and NA5are arranged in the X-axis direction, as polygon vertices composing the polygon model of the curved surface SF (seeFIG. 14). When virtual camera VP is moved closer to a region including the polygon vertices NA1, NA3and NA5and when the region is divided in the plane surface division processing, then five polygon vertices NB1to NB5are generated in the X-axis direction as shown inFIG. 15B. That is, with the result that the virtual camera VP is moved closer to the region including the polygon vertices NA1, NA3and NA5, a surface whose shading is defined by the polygon vertices NA1, NA3and NA5, respectively having the normal vectors VA1, VA3and VA5, is changed to a surface whose shading is defined by polygon vertices NB1to NB5, respectively having the normal vectors VB1to VB5.

In this case, the normal vector VA3corresponding to the polygon vertex NA3is drastically changed to the normal vector VB3corresponding to the polygon vertex NB3. That is, although the curved surface SF (seeFIG. 14) is fixed and a position of a light source is not changed, the shading in the vicinity of the polygon vertex NA3(the polygon vertex NB3) is changed drastically, which causes an unnatural change in the image.

In order to solve this problem, in the present embodiment, normal vectors corresponding to respective pixels of the distance-containing image PM shown inFIG. 13Aare generated by using the normal vector image to be described with reference toFIGS. 16A,16B and16C.FIGS. 16A,16B and16C are diagrams showing exemplary normal vector image generation processing. In the normal vector image generation processing (i.e., processing executed in “a reference point setting step”, “an outer-circumference point setting step”, “a second distance reading step”, “a second coordinate point calculation step”, and “a normal vector calculation step”), a normal vector image VM shown inFIG. 16cis generated from the distance-containing image PM shown inFIG. 13A(also shown inFIG. 16B).

Specifically, as shown inFIG. 16A, a reference point Q0(not shown in the diagram since the point Q0is positionally identical to a point P0to be described later), which is a target point with respect to which normal vector information is generated, is set sequentially on the distance-containing image PM (corresponding to the pixels of the distance-containing image PM). The distance-containing image PM is interrelated to the distance information, and is stored in the internal main memory11e. In the distance-containing image PM (i.e., virtual plane surface PL), two outer-circumference points Q1and Q2(not shown in the diagram since the points are positionally identical, respectively, to points P1and P2to be described later) are set. The two outer-circumference points Q1and Q2are distanced from the reference point Q0by a predetermined unit distance d (the “unit distance d” corresponding to an “inter-pixel distance on the distance-containing image PM”, in this case) in a predetermined first direction (i.e., the Z-axis direction). Further, two outer-circumference points Q3and Q4(not shown in the diagram since the points are positionally identical to points P3and P4to be described later) are set, the outer-circumference points Q3and Q4being respectively distanced from the reference point Q0by the unit distance d in a second direction (i.e., the X-axis direction) perpendicular to the first direction (i.e., Z-axis direction). In the present embodiment, a case where the unit distance d corresponds to the inter-pixel distance on the distance-containing image PM will be described, however, the unit distance d may be any integer times (e.g., 4 times) longer than the inter-pixel distance on the distance-containing image PM.

Next, the distance information corresponding to the reference point Q0and the four outer-circumference points Q1to Q4is read from the internal main memory11e(the information corresponding to the distance-containing image PM shown inFIG. 16B). Next, calculated are coordinate points of positions to which the reference point Q0and the four outer-circumference points Q1to Q4are respectively moved in parallel in a direction (the Y-axis direction) perpendicular to the virtual plane surface PL (i.e., the distance-containing image PM) by a distance indicated by the read distance information. Based on five points P0, P1to P4corresponding to the calculated coordinate points, normal vectors V1to V4of four triangle polygons (shaded areas shown inFIG. 16A) are calculated, respectively. The four triangle polygons each has vertices composed of the point P0corresponding to the reference point Q0, either of P1or P2corresponding to either of two outer-circumference points Q1or Q2which is distanced from the reference point Q0in the first direction (Z-axis direction), and either of P3or P4corresponding to either of the two outer-circumference points Q3or Q4, which is distanced from the reference point Q0in the second direction (the X-axis direction). An average value of the normal vectors V1to V4is then calculated, and is interrelated to the information indicative of the position of the reference point Q0on the virtual plane surface PL so as to be stored in the internal main memory11e.

The average value (the normal vector corresponding to the reference point Q0) of the normal vectors V1to V4is stored in the internal main memory11eas image information in which respective positions and colors of the respective points composing the normal vector image VM shown inFIG. 16ccorrespond to the respective positions and the normal vectors on the curved surface SF (seeFIG. 14). In other words, the positional information of the reference point Q0is stored in the internal main memory11eas the positional information of the normal vector image VM shown inFIG. 16c, and an X component, a Y component and a Z component of the normal vector corresponding to the reference point Q0are stored in the internal main memory11eas an R (red) color, a G (green) color, and a B (blue) color information of the normal vector image VM shown inFIG. 16c, respectively.

In this manner, the normal vector information is stored as the normal vector image VM, and thus the normal vector information can be stored efficiently. That is, a capacity required for storing the normal vector information can be reduced, and also the normal vector information can be read efficiently.

The present embodiment exemplifies the case where the normal vector information is stored as the color information (the RGB color information) of the image information. However, the normal vector information may be stored as other information (e.g., the α value indicative of a degree of transparency or the like) corresponding to pixels composing the image. Further, although the present embodiment exemplifies the case where the normal vector image VM is stored in the internal main memory11e, the normal vector image VM may be stored in another storage means (e.g., the flash memory17or the like).

In the present embodiment, the normal vector image VM is preliminarily generated and stored in the internal main memory11e, and at the time when a game is started, the normal vectors, which correspond to the polygon vertices and which are used for shading, are respectively read and set as color information (RGB information) of the normal vector image VM stored in the internal main memory11e. In this manner, the normal vectors are set based on the normal vector image VM. Therefore, even in the case where the number of divisions is changed due to a movement of the virtual camera VP or the like, changes in the normal vector of the polygon vertices can be minimized. Accordingly, images can be displayed without bringing a sense of discomfort. Further, since the normal vector image VM is preliminarily stored in the internal main memory11e, the normal vectors corresponding to the polygon vertices can be calculated efficiently.

In the present embodiment, the case where the normal vector image VM is preliminarily generated and stored in the internal main memory11ebefore the game is started is described. However, in the case where one curved surface is selectable from among a plurality of preliminarily set curved surfaces SF (seeFIG. 14) during the game, the normal vector image VM may be generated, at a timing when the one curved surface SF is selected, based on the distance-containing image PM corresponding the selected curved surface SF. In this case, the normal vector image VM does not need to be stored preliminarily, and thus a capacity required for storing the normal vector image VM can be reduced.

Hereinafter, with reference toFIGS. 17 to 21, an operation of the game apparatus3will be described.FIG. 17is an exemplary memory map of the internal main memory11e. Data which is not important in the present invention is omitted from the diagram. Instead of the internal main memory11e, the external main memory12, the flash memory17or the like may be used. In the internal main memory11e, an image processing program40, distance data41, normal vector data42, block data43and model data44are stored.

The image processing program40is a computer program for causing a computer (the CPU10or the GPU11b) to execute processing described in flowcharts shown inFIGS. 18 to 21. In the present embodiment, the image processing program40is loaded from the optical disc4to the internal main memory11e. The image processing program40may be provided not only from the optical disc4but also from any other arbitrary external storage medium. Alternatively, the image processing program40may be provided from another computer system via a wired or wireless communication line, or may be preliminarily stored in an involatile storage device such as the flash memory17embedded in the game apparatus3.

The distance data41is data composing the distance-containing image PM shown inFIG. 13A, and stores therein the distance information by interrelating the distance information to the positional information. The distance data41is typically loaded from the optical disc4to the internal main memory11e.

The normal vector data42is data composing the normal vector image VM shown inFIG. 16c, and stores therein the normal vector information by interrelating the normal vector information to the positional information. The normal vector data42is generated based on the distance data41by the CPU10(or the GPU11b), and stored in the internal main memory11e.

As above described, in the case where the distance information is stored as the α value information, and the normal vector information is stored as the RGB information, it is preferable that the distance data41and the normal vector data42are stored as one piece of image data. That is, the distance information and the normal vector information are interrelated to the positional information indicative of positions of the pixels (grid points arranged at regular intervals) on the virtual plane surface PL shown inFIG. 8, and then the distance information is stored as the α value information, whereas the normal vector information is stored as the RGB information, Accordingly, a required storage capacity can be reduced.

With respect to each of the regions generated in the plane surface division processing described with reference toFIGS. 8 to 12(hereinafter referred to as “blocks” in order to distinguish the regions from the triangle regions), the block data43stores therein an X coordinate and a Z coordinate of a central position of each of the blocks and the number of times to divide each of the blocks. The block data43is generated and stored by the CPU10(or the GPU11b).

The model data44stores therein the polygon data (coordinate point data, normal vector data and the like of the polygon vertices) generated in the polygon generation processing described with reference toFIGS. 13 and 14by interrelating the polygon data to the block data43. The model data44is generated by the CPU10(or the GPU11b), and stored in the internal main memory11e.

With reference to the flowcharts shown inFIGS. 18 to 21, an operation of the CPU10(or the GPU11b) based on the image processing program40will be described. Processing of respective steps in each of the flowcharts shown inFIGS. 18 to 21may be executed by either the CPU10or the GPU11b. Either the CPU10or the GPU11b, which is appropriate to each of the steps, may execute the processing.FIG. 18is a flowchart showing an exemplary operation of the CPU (GPU). In the present embodiment, the processing of steps S101to S107and step S111in the flowchart shown inFIG. 18is executed by the CPU10, whereas the processing of step S109in the flowchart shown inFIG. 18is executed by the GPU11b.

When an execution of the image processing program40is started, a series of processing in the flowchart shown inFIG. 18are started. Processing of selecting a curved surface to be displayed or the like may be added to the flowchart shown inFIG. 18, in accordance with an external input performed by the user or other conditions.

In step S101, the CPU10generates the normal vector data42in accordance with the distance data41and records the normal vector data42in the internal main memory11e. The normal vector image generation processing executed in step S101will be described later in detail with reference toFIG. 19. In step S103, in response to an instruction from the controller7, the CPU10sets a position of the virtual camera VP.

In step S105, the CPU10generates the block data43in accordance with the position of the virtual camera VP set in step S103, and records the block data43in the internal main memory11e. The block generation processing executed in step S105will be described later in detail with reference toFIG. 20.

In step S107, the CPU10generates the model data44in accordance with the block data43generated in step S105, and records the model data44in the internal main memory11e. The polygon generation processing executed in step S107will be described later in detail with reference toFIG. 21.

In step S109, the GPU11bdraws the curved surface SF in accordance with the model data44generated in step S107. Specifically, the GPU11breads the model data44from the internal main memory11e, and draws the curved surface SF in a frame memory in the VRAM11d. In step S111, in response to the instruction from the controller7, the CPU10determines whether or not to terminate the image processing. When the CPU10determines to terminate the image processing (YES in S111), the CPU10terminates the image processing. When the CPU10determines not to terminate the image processing (NO in S111), the CPU10returns the processing to step S103, and repeats execution of the processing of step S103and thereafter.

The above-described processing from step S103to step S111is repeated at one-frame cycle (e.g., at a cycle of 1/60 sec.), and consequently, moving images indicative of the curved surface SF are displayed on a screen of the television2.

The present embodiment is exemplified by a case where, in step S101, the CPU10generates normal vector data42in accordance with the distance data41, and records the generated normal vector data42in the internal main memory11e. However, the normal vector data42may be generated preliminarily and stored in the internal main memory11eor the like. In this case, the processing for generating the normal vector data42is not necessary, and thus the processing is simplified.

FIG. 19is a flowchart showing, in detail, exemplary normal vector image generation processing executed in step S101in flowchart shown inFIG. 18. With reference toFIG. 16, the normal vector image generation processing will be described. In step S201, the CPU10sets the reference point Q0, which is the target point with respect to which the normal vector information is generated, in accordance with the respective points on the virtual plane surface PL (i.e., executes the “reference point setting step”). In step S203, the CPU10sets the outer-circumference points Q1to Q4in accordance with each of the reference points Q0set in step S201(i.e., executes the “outer-circumference point setting step”).

In step S205, the CPU10reads, from the internal main memory11e, the distance information corresponding to each of the reference point Q0and the outer-circumference points Q1to Q4set in steps S201and S203(i.e., executes the “second distance reading step”). In step S207, the CPU10generates four triangle polygons, and the vertices thereof are selected from the points P0to P4on the curved surface SF (i.e., executes the “second coordinate point calculation step), the points P0to P4corresponding to the reference point Q0and the outer-circumference points Q1to Q4, respectively. In step S209, the CPU10calculates the normal vectors V1to V4of the four triangle polygons generated in step S207(i.e., executes the “normal vector calculation step”). In step S211, the CPU10calculates the average value of the four normal vectors V1to V4generated in step S209(i.e., executes the “average calculation step”). In step S213, the CPU10interrelates the calculated average value to the information indicative of the position of the reference point Q0on the virtual plane surface PL so as to be recorded in the internal main memory11e.

In step S215, the CPU10determines whether or not all the points on the virtual plane surface PL (all the pixels on the distance-containing image PM) have been set as the reference points Q0. When all the points on the virtual plane surface PL are determined to have been set as the reference points Q0(YES in step S215), the CPU10returns the processing to S103. When all the points on the virtual plane surface PL are determined not to have been set (NO in S215), the CPU10returns the processing to step S201, sets points yet to be set as reference points Q0in step S201, and repeats the processing in step S201and thereafter.

FIG. 20is a flowchart showing, in detail, exemplary block generation processing executed in step S105in the flowchart shown inFIG. 18. With reference toFIGS. 8 to 12, the block generation processing is described. In step301, the CPU10divides the virtual plane surface PL into four blocks, i.e., blocks PL11to PL14(i.e., executes the “first division step”, seeFIG. 8). In step303, the CPU10determines whether or not any of the blocks generated in step S301(or in step S311) is outside the field of view of the virtual camera VP (i.e., executes the “field of view determination step”, seeFIG. 9).

When it is determined that no block is outside the field of view (NO in step S303), the CPU10proceeds to the processing in step S307. When it is determined that some block is outside the field of view (YES in step S303), the CPU10excludes, in step305, the block outside the field of view from target blocks to be processed (i.e., executes the “region exclusion step”, seeFIG. 8). In the case of NO in step S303, or in the case where the processing in step S305is terminated, in step S307, the CPU10calculates the size evaluation value of each of the blocks (which are not excluded from the target blocks to be processed in step S305, among the blocks generated in step S301or in step311) (i.e., executes the “size evaluation value calculation step”, seeFIG. 10).

In step S309, the CPU10determines whether or not there is any block whose size evaluation value calculated in step S307is equal to or more than the predetermined threshold value (a block needs to be further divided). That is, the CPU10executes a “division necessity determination step”. When it is determined that there is no block which needs to be divided (NO in S309), the CPU10proceeds to the processing in step S313. When it is determined that there is some block which needs to be divided (YES in S309), the CPU10equally divides the block, which is necessary to be divided, into four blocks, respectively (i.e., executes the “second division step”), and returns to the processing in step S303. The CPU10then repeats the processing in step S303and thereafter until it is determined that there is no block which needs to be divided (NO in step S309).

In the case of NO in step S309, the CPU10temporarily stores, in step S313, the X coordinate and the Z coordinate of the central position of each of the blocks and the number of times to divide each of the blocks generated in step S301or in step S311into the internal main memory11eshown inFIG. 2as the block data (seeFIG. 17). In step S315, the CPU10generates 36 small blocks by equally dividing each of the blocks generated in step S301or in step S311(i.e., executes the “re-division step”, seeFIG. 11). In step S317, the CPU10divides the small blocks generated in step S315into the triangle regions (executes a part of the “triangle generation step”, seeFIG. 11), and returns the processing to step S107(seeFIG. 18).

In the present embodiment, the case is described where, in step S313, the CPU10records the block data in the internal main memory11e. However, the block data may be stored in another memory (such as the flash memory17).

Further, in the present embodiment, the case is described where, in step S315, each of the blocks generated in step S301or in step S311are equally divided into the 36 small blocks, the small blocks are divided into the triangle regions in step S317, and then, in step S413in the flowchart shown inFIG. 21, the triangle polygons corresponding to the triangle regions are generated. However, each of the blocks generated in step S301or in step S311is divided into the triangle regions, and the triangle polygon corresponding to the triangle regions may be generated in step S413in the flowchart shown inFIG. 21(i.e., the triangle regions may be generated without the “re-division step” being executed).

FIG. 21is a flowchart showing, in detail, exemplary polygon generation processing executed in step S107in the flowchart shown inFIG. 18. In step S401, the CPU10reads the block data43which is interrelated to the model data44and stored in the internal main memory11ein step S415in a most recent run of the polygon generation processing. In step S403, the CPU10selects and reads one piece of block data from the block data43stored in the internal main memory11ein step S313in the flowchart shown inFIG. 20.

In step S405, the CPU10determines whether or not, in the block data43read in step S401, there is some piece of block data which corresponds to the piece of the block data read in step S403. That is, the CPU10determines whether or not, in the block data43, there is any piece of block data, with respect to which polygons have been generated in the most recent run of the polygon generation processing or therebefore and which has been interrelated to the model data44and stored in the internal main memory11e. When it is determined that there is some piece of such block data included in the block data43(YES in S405), the CPU10proceeds to the processing in step S417. When it is determined that there is no piece of such block data included in the block data43(NO in S405), the CPU10reads, in step S407, from the distance data41stored in the internal main memory11e, the distance information corresponding to each of the vertices of the small blocks included in the block data read in step S403(i.e., executes the “first distance reading step”).

In step S409, the CPU10calculates, by using the distance information read in step S407, the coordinate points of the polygon vertices corresponding to the vertices of the small blocks included in the block data read in step S403(i.e., executes the “first coordinate point calculation step”). In step S411, the CPU10generates, for each piece of the block data read in step S403,72triangle polygons (seeFIG. 11B) by using the coordinate points of the polygon vertices calculated in step S409(i.e., the “triangle generation step” is executed). In step S413, the CPU10reads the normal vector information, which corresponds to the pixels included in the triangle polygons generated in step S411, from the normal vector data42stored in the internal main memory11e(i.e., the “normal vector reading step” and the “normal vector setting step” are executed).

In step S415, the CPU10uses the polygon data generated in steps S411and S413as the model data44, and interrelates the model data to the block data43read in step S403so as to be stored in the internal main memory11e. When the processing in step S415is terminated, or in the case of YES in step S405, the CPU10determines, in step S417, whether or not the selection of all pieces of the block data stored in the internal main memory11eis completed. When it is determined that the selection of all the pieces of the block data is completed (YES in S417), the CPU10returns the processing to step S109(seeFIG. 18). When it is determined that the selection of all the pieces of block data is yet to be completed (NO in S417), the CPU10returns the processing to step S403, and selects one piece of the block data, which is yet to be selected. The CPU10repeatedly executes the processing in step S403and thereafter until it is determined, in step S417, that the selection of all pieces of the block data is completed.

In this manner, in the polygon generation processing shown inFIG. 21, polygons are generated with respect to a piece of block data, in the case where the piece of the block data is not included in the block data43which includes pieces of block data whose polygons have been generated and whose model data44has been stored in the internal main memory11ein the most recent run of the polygon generation processing or therebefore, (i.e., in the case where the piece of the block data corresponds to a block which is newly generated in current block generation processing). Therefore, the processing can be simplified.

That is, in the case where the model data44generated in the most recent run of the polygon generation processing or therebefore is identical to the model data generated in the current polygon generation processing, the model data will not be generated in the current polygon generation processing. In other words, in the case where a piece of block data, which is generated in the current polygon block generation processing (seeFIG. 20) and which is stored in the internal main memory11e, is identical to another piece of block data whose model data is already stored in the internal main memory11e, then the model data44generated in the most recent run of the polygon generation processing or therebefore is read from the internal main memory11eand used for generating, in the current flow of the polygonal block generation processing, the polygon model of the piece of block data. Therefore, the processing can be simplified.

As above described, according to the present embodiment, it is possible to generate appropriate polygon information (i.e., the model data44) which is capable of securing the quality of the images viewed from the virtual camera VP and which requires a small amount of storage capacity.

The present invention is applicable to an image processing program and an image processing device of a game apparatus or the like. Particularly, the present invention is applicable to an image processing program and an image processing apparatus for drawing an image of a curved surface (e.g., a curved surface indicative of a landform) as viewed from a virtual camera situated in a virtual three-dimensional space, the curved surface being arranged in the virtual three-dimensional space and having undulations which are defined in accordance with distances from a virtual plane surface which is also arranged in the virtual three-dimensional space.