// テクスチャマッピングの実験用シーンファイル #include "colors.inc" #include "shapes.inc" #include "stones.inc" // 石のテクスチャ集 // 石のテクスチャ各種 #declare Tex = array[30] { T_Grnt0, T_Grnt1, T_Grnt2, T_Grnt3, T_Grnt4, T_Grnt5, T_Grnt6, T_Grnt7, T_Grnt8, T_Grnt9, T_Grnt10, T_Grnt11, T_Grnt12, T_Grnt13, T_Grnt14, T_Grnt15, T_Grnt16, T_Grnt17, T_Grnt18, T_Grnt19, T_Grnt20, T_Grnt21, T_Grnt22, T_Grnt23, T_Grnt24, T_Grnt25, T_Grnt26, T_Grnt27, T_Grnt28, T_Grnt29 } // ポーン(チェスの歩兵) #declare Pawn = merge { object { Sphere scale 1.0 translate 3.0*y } object { Cone_Y scale <1.0, 2.0, 1.0> translate 2.0*y } object { Cube scale <1.0, 0.40, 1.0> translate 0.40*y } scale 0.25 } // ポーンを二次元的に整列配置 #declare I = 0; #while ( I < 30 ) #declare X = mod(I, 6); #declare Z = int(I/6); object { Pawn texture { Tex[I] } finish { ambient 0.4 diffuse 0.6 reflection 0.0 } translate } #declare I = I + 1; #end // 床平面 object { Plane_XZ pigment { color LightWood } finish { ambient 0.4 diffuse 0.6 reflection 0.0 } } // 座標軸 /* object { Cylinder_X scale 0.05 pigment{color Red} } // x軸 object { Cylinder_Y scale 0.05 pigment{color Green} } // y軸 object { Cylinder_Z scale 0.05 pigment{color Blue} } // z軸 */ // 背景 background { color LightBlue } // 光源 light_source { <25, 100, -50> color White*2.0 parallel point_at <0, 0, 0> } // カメラ camera{ location <0.0, 15.0, -15.0> look_at <0.0, 0.0, 0.0> angle 17 }