metal "Metalic reflection sample" { cond 0,3, 8,2,12; // distributed ray-tracing // cond 0,1, 8,1,0; // normal ray-tracing view 30, 0,0,1, 0,0,10, 0,-100,70; ambi 1.0, 0.200,0.100,0.400, 0.200, 0,0; inf 1,-1,1, 0.267, 1.000,1.000,1.000; // ground attr ground2= { color 0,0,1; // 青(R,G,B) diff 1.00,0.000; }; attr ground= { color 0.9,0.9,0.9; // 白(R,G,B) diff 1.00,0.000; checker 10,ground2; }; plane 0,0,0, 0,0,1; attr base= { color 0,0,0; // 黒(R,G,B) diff 0.20,0.000; refl 0.80,1,0.2; // 次行の設定で視線が反射するときに、正しい反射方向から // 最大10°の範囲に分散して反射レイが生成される。 // このため、金属表面に見られる鈍い反射が表現される。 // 透明体の場合も同様に10°の範囲で分散するので、 // 曇りガラスのような効果が得られる。 option disdg=10; }; and { para 0,0,10; plane 0,0,0, 0,0,1; plane 0,0,-5, 0,0,-1; cylind 0,0,0, 0,0,1, 25; } attr top= { color 0.3,0.3,0.3; // 灰色(R,G,B) diff 1.00,0.400; }; and { para 0,0,32; plane 0,0,2, 0,0,1; plane 0,0,0, 0,0,-1; cylind 0,0,0, 0,0,1, 25; cylind 0,0,0, 0,0,1, -15; plane 0,0,0, 0,-1,0; } attr Orange= { option hsv; // HSV色座標系を指定 color 25,0.8,0.9; // H,S,V diff 1.00,0.300; refl 0.01,80,0.1; }; and "円柱" { para 0,0,11; plane 0,0,20, 0,0,1; plane 0,0,0, 0,0,-1; or { var i=0, t; while (i<5) { t=(i - 2)*40 + 90; cylind 20*cos (t*2*PI/360),20*sin (t*2*PI/360),0, 0,0,1, 3; i=i+1; } } } } THLweOo1Fe