coding UTF-8; // 文字化け対策 // 必要なライブラリの読み込み import graphics3d.Graphics3DFramework ; import Graphics3D ; import Math; // 円周率(PI)の値を使うため // プログラムの最初に呼び出される関数 void onStart ( int rendererID ) { // 画面サイズや背景色の設定(省略可能) setWindowSize(800, 600) ; setBackgroundColor(0, 0, 0, 255) ; // 座標軸モデルを生成して配置 int axis = newAxisModel( 3.0, 3.0, 3.0 ) ; mountModel( axis, rendererID ) ; // 箱型モデルを生成して配置 int box = newBoxModel( 2.0, 2.0, 2.0 ) ; mountModel( box, rendererID ) ; // Z軸まわりに45度回転 rotModelZ( box, PI/4.0 ); }