import Graphics; import Graphics3D; import GUI; // Create graphics data and 3D renderer int graphicsID = newGraphics( ); int rendererID = newGraphics3DRenderer( 800, 600, graphicsID ); // Create display window int windowID = newWindow( 0, 0, 800, 600, " Hello 3DCG ! " ); int labelID = newImageLabel( 0, 0, 800, 600, graphicsID ); mountComponent( labelID, windowID ); setGraphics3DColor( rendererID, 0, 0, 0, 255 ); // Set background to black paintGraphics3D( rendererID ); // Render 3DCG // Refresh GUI paintComponent( labelID ); paintComponent( windowID ); // To export the image as a PNG file, uncomment the following line: //exportGraphics( graphicsID, "Test.png", "PNG" );