POV-Ray : Newsgroups : povray.advanced-users : Bitwise AND : Re: Bitwise AND Server Time
29 Jul 2024 02:20:27 EDT (-0400)
  Re: Bitwise AND  
From: Warp
Date: 6 Apr 2004 07:12:36
Message: <407290a4@news.povray.org>
Slime <fak### [at] emailaddress> wrote:
> #debug "X was " + x + ", velocity was " + vel + "."

  The problem with that is that POV-Ray can't know how many decimals you
want to print with those.

  A safe option is to internally use the "%g" printf() option which will
print only as many decimals as necessary (ie. it will not print trailing
zeroes after the decimal points), but it still can print something you
don't want to. Also, I think there's some odd limit to the maximum
amount of decimals "%g" will print which was quite low (6 or something
like that) and you might want more in many cases. "%g" will also print
in "scientific" format (ie. if the decimal place is too far from the
significant numbers it will use the 'e' notation (eg. "1.4531e-9")),
and in some cases you might not want that.

  The question is, thus, if you want to print something different from
the default "%g" format (which POV-Ray should use when nothing else
is specified, like in your example above), how do you tell it?

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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