回転 rotate
物体を回転させます。
rotateは指定された軸周りに回転させることができます。
左上が元の状態です。
#include "colors.inc"
camera { location<0,40,-45> look_at<0,0,0> }
light_source { <-30,30,-30> color rgb 1 }
plane { y,0 pigment { checker color White, color Gray50 } scale 10 }
box { <-5,0,-5>,<5,10,5> translate<-15,5,15> pigment { color Cyan } }
box { <-5,0,-5>,<5,10,5> rotate x*45 translate<15,5,15> pigment { color Blue } }//x軸中心に45度回転(右上
box { <-5,0,-5>,<5,10,5> rotate y*45 translate<-15,5,-15> pigment { color Red } }//y軸中心に45度回転(左下
box { <-5,0,-5>,<5,10,5> rotate z*45 translate<15,5,-15> pigment { color Green } }//z軸中心に45度回転(右下
