|
|
John VanSickle wrote:
>
> Dan Connelly wrote:
> > ----------------------------------------
> > light_source { 3 color rgb 1 }
> > camera { location 2 look_at 0 }
> > sphere { 0, 1 pigment { color rgb 1 } }
> >
> > #declare uv = <1, 2>;
> > #debug concat("uv.u = ", str(uv.u, 0, -1), "\n")
> > #debug concat("uv.v = ", str(uv.v, 0, -1), "\n")
>
> The vector uv probably got promoted to a 3-dimensional vector. When POV
> expects a <u,v> vector and it is given an <x,y,z> vector, strange things
> happen. If you declare it this way:
>
> #declare uv= u + 2*v;
>
> it might work differently.
>
> Hope this helps,
> John
> --
> "He has the power to rear-project major cities!" -- Mike Nelson
Actually, I see no difference.... if <1,2> would get promoted,
so would <u + 2*v>.... the expression parser would substitute
the values of u and v, then parse the result.
In any case, the suggested fix makes the same error.
But promotion shouldn't matter, since v works with 3-d vectors and
y fails on 2-d vectors.
The code fix for this bug has previously been reported by someone
else. I will see if I can track it down in the source myself.
Dan
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|