POV-Ray : Newsgroups : povray.general : A Tip for Variables : Re: A Tip for Variables Server Time
10 Aug 2024 09:11:14 EDT (-0400)
  Re: A Tip for Variables  
From: Philippe Debar
Date: 2 Feb 2000 04:30:06
Message: <3897f91e@news.povray.org>
I try to use the following rules, although my syntax isn't always
consistent:
* always begin with an uppercase to prevent collision with future / patch
names (I do not like this one, but it is useful)
* for inc files, begin with a 2-4 acronym for the file name (I usually do
not do this while developing the file, but add this with some "replace all"
operation when I start including it in other files)
* use descriptive names, like "JoiningSphereRadius"
* use a type description suffix like "_pi" for pigment

On the whole this gives quite long names. One (boggus) example:
"TormInnerTorus_tx" (Torus Madness, Inner Torus, texture)


 This make reading formulas difficult. So, I use two solutions:
* use work names during development, and replace them when finished
* use #local cryptic names with only the file acronym, often doing things
like
      #ifndef( TormTotalTorusCount_int) #declare TormTotalTorusCount_int=15;
#end
      #local TormIt1= TormTotalTorusCount_int;
      or
      // Total number of torii parts
      #local TormIt2=
TormTotalTorusCount_int*TormTorusDecompositionSteps_int


Philippe


Post a reply to this message

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