POV-Ray : Newsgroups : povray.general : A Tip for Variables : Re: A Tip for Variables Server Time
10 Aug 2024 09:09:57 EDT (-0400)
  Re: A Tip for Variables  
From: John VanSickle
Date: 30 Jan 2000 12:38:33
Message: <38947918.34ECF49D@erols.com>
Remco de Korte wrote:
> 
> John VanSickle wrote:
> >
> > Anyway, here are the letters I'm using, and what they stand for:
> >
> > c = the total number of a group of objects (ie, count)
> > f = a scalar representing a flag
> > i = an index
> > l = a scalar representing length
> > p = a vector representing a specific point in space
> > r = a scalar representing the radius of something
> > s = a scalar
> > v = a vector
>
> I'm not sure if I understand your choice of letters or categories but
> I think I'll try it out some time.

Well, they're based on English words; your mileage may vary.

> I often have conflicts of this type, especially with scenes that use a
> lot of independantly created inc-files (that use #declare where they
> should use #locals - another habit I should do something about....)
> 
> If it's just to avoid conflicts it might be enough to distinguish the
> different type of vectors. Perhaps a pv (point-vector), cv
> (colour-vector), tv (transmit-colour-vector), fv (guess...)
> It might also be useful to distinguish reals from integers (or
> variables that are supposed to be), for counters for instance.

Cardinal numbers (ie representing the total number of a kind of item) have c at the
beginning. 
Ordinal numbers (representing which item in an array, perhaps) begin with i.

Reals that represent a length begin with l (the letter).
Reals that represent a radius begin with r.
Other reals start with s (for scalar).

> How about #macros and objects?

I haven't had more than one or two collison problems with those.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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