POV-Ray : Newsgroups : povray.general : 3.1r1 BUG REPORT : 2-d vectors, uv : Re: 3.1r1 BUG REPORT : 2-d vectors, uv Server Time
13 Aug 2024 09:33:50 EDT (-0400)
  Re: 3.1r1 BUG REPORT : 2-d vectors, uv  
From: John VanSickle
Date: 25 Sep 1998 19:55:18
Message: <360C0F0E.7F131770@erols.kosher.com>
Dan Connelly wrote:
> 
> Note on 3.1, bug reports have gone from email to news,
> so I am posting mine here.
> 
> The component operators don't work on 2-d vectors.  This
> problem has existed 3.02 (at least).   A sample file :
> 
> ----------------------------------------
> 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


Post a reply to this message

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