POV-Ray : Newsgroups : povray.general : 3.1r1 BUG REPORT : 2-d vectors, uv : Re: 3.1r1 BUG REPORT : 2-d vectors, uv Server Time
16 Nov 2024 07:13:09 EST (-0500)
  Re: 3.1r1 BUG REPORT : 2-d vectors, uv  
From: Dan Connelly
Date: 25 Sep 1998 20:15:40
Message: <360C2401.305C0951@flash.net>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.