import graphics3d.Graphics3DFramework; import Graphics3D; // Variables to store model IDs int axis, sphere; // Called at the start of the program void onStart ( int rendererID ) { // Set window size and background color (optional) setWindowSize( 800, 600 ); setBackgroundColor( 0, 0, 0, 255 ); // Generate and mount axis model axis = newAxisModel( 3.0, 3.0, 3.0 ); mountModel( axis, rendererID ); // Generate and mount sphere model sphere = newSphereModel( 1.0, 1.0, 1.0, 10, 7 ); mountModel( sphere, rendererID ); } // Called several dozen times per second void onUpdate (int renderer) { // Move gradually along the X-axis moveModel( sphere, 0.02, 0.0, 0.0 ); }