LESSON 5
My First 3D Program
1. Creating a 3D game or application is a simple matter of adding levels of detail to a program. Take a simple cube spinning program. The steps are to first create the cube, then to turn it slowly over time.
2. Type out the following small program into the editing area:

    	MAKE OBJECT CUBE 1,100
    	DO
    	 YROTATE OBJECT 1,OBJECT ANGLE Y(1)+0.1
    	LOOP

3. This program will loop forever spinning the cube very slowly. The MAKE OBJECT CUBE command first creates the cube, the DO and LOOP commands create the infinite loop and the YROTATE OBJECT command applies a new rotation angle to the cube. The new rotation angle is calculated from the current angle of the object plus a small incremental value. As the loop goes round and round, the angle is slowly incrementing causing the cube to spin.
CLICK HERE TO RETURN TO THE MAIN MENU