立方体 box
立方体を表す方法はCubeとboxと二つあります。
この二つの違いが分からないので使いやすいほうでいいと思います。
box { <a,b,c>,<d,e,f> } 手前の座標に始点(図の赤丸)、最後の座標に終点(図の青丸)を指定します。
object { Cube } 基本的にこれだけです。
上記二つはこれだけでは何も見えないので上で説明したようにpigment { color COLOR }で色をつけましょう。
以下が例、左がbox、右がCubeで作成したもの。
#include "colors.inc"
#include "shapes.inc"
#include "glass.inc"
camera { location<7,20,-30> look_at<7,0,0> }
light_source { <30,30,-30> color rgb 1 }
plane { y,0 pigment { checker color White, color Gray50 } scale 10 }
box{
<-10,-10,-10>,<10,10,10>
material { texture { pigment { Col_Glass_Dark_Green } finish{ F_Glass1 } } interior { ior 2.7 } }
//透明なガラスを指定しています、後ほど説明します。
translate<0,10,0>
scale 0.5
}
object{
Cube
material { texture { pigment { Col_Glass_Ruby } finish{ F_Glass1 } } interior { ior 2.7 } }
scale 5
translate<15,5,0>
}
