|
![](/i/fill.gif) |
Brett Kugler wrote:
> Using the unions declared below, the translate's of the form
> translate *x *y *z work as expected, however, the
> translate <x y z>
> does not translate correctly in the -z direction, instead it acts like a -y
> translate.
> Any answers to why this might be happening?
> Thanks in advance, Brett
>
It will work correctly if you add the changes I made below.The way you are doing
it makes the transform wok in an additive evaluation.
You need instead for each to be evaluated on an individual basis. See below -->
> <code snippet>
> #declare wing_bone = union
> {
> cylinder { < 0, -6.0, -1.5>, < 0, -4.0, -0.5>, 0.2 }
> cylinder { < 0, -4.0, -0.5>, < 0, -2.0, -0.0>, 0.2 }
> cylinder { < 0, -2.0, 0.0>, < 0, 2.0, 0.0>, 0.2 }
> cylinder { < 0, 2.0, -0.0>, < 0, 4.0, -0.5>, 0.2 }
> cylinder { < 0, 4.0, -0.5>, < 0, 6.0, -1.5>, 0.2 }
> }
>
> #declare wing = union
> {
>
These
> object { wing_bone scale <1.0 0.4 1.0> translate -6*x translate -3.0*z }
> object { wing_bone scale <1.0 0.6 1.0> translate -4*x translate -2.0*z }
> object { wing_bone scale <1.0 0.8 1.0> translate -2*x translate -1.0*z }
> object { wing_bone scale <1.0 1.0 1.0> }
> object { wing_bone scale <1.0 0.8 1.0> translate 2*x translate -1.0*z }
>
>
now = These -->
> //object{wing_bone scale <1.0 0.4 1.0> translate <-6.0 0.0 -3.0>}
> //object{wing_bone scale <1.0 0.6 1.0> translate <-4.0 0.0 -2.0>}
> //object{wing_bone scale <1.0 0.8 1.0> translate <-2.0 0.0 -1.0>}
> //object{wing_bone scale <1.0 1.0 1.0> translate < 0.0 0.0 0.0>}
> //object{wing_bone scale <1.0 0.8 1.0> translate < 2.0 0.0 -1.0>}
> }
>
> object { wing texture { pigment { color White } } }
> <end code snip>
K.Tyler
Post a reply to this message
|
![](/i/fill.gif) |