![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
<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
{
object { wing_bone scale <1.0 0.4 1.0> translate -6*x -3.0*z }
object { wing_bone scale <1.0 0.6 1.0> translate -4*x -2.0*z }
object { wing_bone scale <1.0 0.8 1.0> translate -2*x -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 -1.0*z }
//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>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/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) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 19 Aug 1998 00:56:55 -0500, Brett Kugler
<w00### [at] mail airmail net> wrote:
>translate <x y z>
>
>does not translate correctly in the -z direction, instead it acts like a -y
>translate.
>//object{wing_bone scale <1.0 0.4 1.0> translate <-6.0 0.0 -3.0>}
The problem here is that POV can't tell whether to parse "0.0 -3.0" as
"0.0-3.0" or "0.0, -3.0" and it chooses the former. Really old versions of
POV supported vectors without commas, and the current version continues to
attempt to support them for backward compatibility, but for all new code,
you should use commas inside vectors.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |