POV-Ray : Newsgroups : povray.general : Collective Short Code Wisdom : Re: Collective Short Code Wisdom Server Time
31 Jul 2024 02:26:50 EDT (-0400)
  Re: Collective Short Code Wisdom  
From: Nicolas Alvarez
Date: 30 Nov 2007 12:28:06
Message: <47504826@news.povray.org>
If there is a number followed by another token (like a keyword), the 
current POV-Ray parser allows you to skip the whitespace. For example:

diffuse 0.6ambient 0.1

For numbers in the 0-1 range, you don't really need the leading 0 here, so:

diffuse .6ambient .1

And in this particular case, where the number starts with a period 
instead of a digit, you can even do this:

diffuse.6ambient.1

Same goes for negative numbers, which start with a dash instead of a digit.

I'm using diffuse and ambient just to give an example. In practice, you 
would use *nothing* according to Mike's tip #4 :) But this tip is useful 
for other keywords.


Post a reply to this message

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