POV-Ray : Newsgroups : povray.general : Can program read float value? Server Time
1 Aug 2024 12:20:23 EDT (-0400)
  Can program read float value? (Message 1 to 2 of 2)  
From: cutejuly
Subject: Can program read float value?
Date: 26 Nov 2005 08:30:01
Message: <web.4388626e5a99d3cdcce6fd2b0@news.povray.org>
Hi! All,

I have some data which are float values (i.e 100.2454, 2034,2312 etc).

I want to draw the spheres with float data as positions. Can POV-RAY
recognize the float? If it doesnot, do I have to change the data type to
integer like 100,2034 etc). Actually, I tried to make sphere with float
positions, but, result is something weird. So, I am asking that.

Thanks a lot.


Post a reply to this message

From: Alain
Subject: Re: Can program read float value?
Date: 26 Nov 2005 13:39:02
Message: <4388abc6@news.povray.org>
cutejuly nous apporta ses lumieres en ce 2005-11-26 08:26:
> Hi! All,
> 
> I have some data which are float values (i.e 100.2454, 2034,2312 etc).
> 
> I want to draw the spheres with float data as positions. Can POV-RAY
> recognize the float? If it doesnot, do I have to change the data type to
> integer like 100,2034 etc). Actually, I tried to make sphere with float
> positions, but, result is something weird. So, I am asking that.
> 
> Thanks a lot.
> 
> 
> 
> 
> 
For floats, the decimal separator must be the dot(.). In your exemple, one use a dot
(correctly 
interpreted as 100.2454), the other use a comma (incorrectly interpreted as 2034 and
2312). Commas 
are used as separators between distinct values (also space, tab and return known as
"white space"). 
To my knowlege, POV Ray assume that any values it encounter is a float or a vector of
floats.
You can use something like 123, 12.345 or use scientific notation like 1.234e5.

-- 
Alain
-------------------------------------------------
Lutheran: If shit happens, don't talk about it.


Post a reply to this message

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