POV-Ray : Newsgroups : povray.general : #read only supports 3D vectors : Re: #read only supports 3D vectors Server Time
3 Aug 2024 22:17:29 EDT (-0400)
  Re: #read only supports 3D vectors  
From: None
Date: 6 Oct 2003 12:43:15
Message: <Xns940C81678D7CDNone@204.213.191.226>
"Tim Nikias v2.0" <tim.nikias (@) gmx.de> wrote in
news:3f81417f@news.povray.org: 

> I've never noticed that the default isn't proper. E.g. for floats, it
> will just put 0.2 for 0.2, but it will use .21342 if that's the
> number. AFAIK, that's the same for vectors, so what you're doing is
> forcing it to round to a certain precision.

No, Povray uses default precision, try it.  If one of the numbers is 
really small, Povray's default will write out something like: "1.22461e-
032", which might be rounding errors I don't want to carry forward.  On 
the other hand, if one of the numbers is 1.0000005, Povray will write out 
"1", which is precision I don't want to lose.  (I'm using the Windows 
version).
 
> Have you looked at the output-file to see if the vector is written
> correctly? And I'm not too sure, but isn't the variable you're loading
> a value to (CurColor in this case) supposed to be undefined before
> loading? 

Yes, it's written correctly in the file, and... EUREKA! That's the 
problem, because I had already initialized the vector.  Hehehe, from the 
Help on #read: "A DATA_IDENTIFIER is any undeclared identifier or any 
previously declared string identifier, float identifier, or vector 
identifier.".  I guess that doesn't apply to non 3D vectors.  I've 
initialized all of my other variables and 3D vectors before reading them 
without any issues, so I didn't think about that for a 4D.

Thanks.


Post a reply to this message

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