POV-Ray: declare


自分で物体を定義する bearleg01.pov


bearleg01.pov
// Nitta 2008.04.20
#include "colors.inc"
#include "shapes.inc"
#include "woods.inc"

camera {
  location <25,15,20>
  look_at <0,2,0>
  angle 10
}

light_source { <30,20,20> color White*2 }
light_source { <-30,20,20> color White }

#declare LEG_LENGTH = 1.2;
#declare SOLE_HEIGHT = 0.4;

#declare PHI = 30;

#declare BEAR_LEG =
union {
  object {
    Sphere
    texture { T_Wood7 }
    scale <0.45,LEG_LENGTH,0.45>
    translate <0,-LEG_LENGTH,0>
  }
  object {
    Sphere
    texture { T_Wood7 }
    scale <0.7,SOLE_HEIGHT,0.45>
    translate <0.15,-LEG_LENGTH*2,0>
  }
}

object {
  BEAR_LEG
  rotate <0,0,-PHI>
  translate <0,LEG_LENGTH*2+SOLE_HEIGHT,0.35>
}

object {
  BEAR_LEG
  rotate <0,0,PHI>
  translate <0,LEG_LENGTH*2+SOLE_HEIGHT,-0.35>
}