POV-Ray : Newsgroups : povray.general : Scaling macros? : Re: Scaling macros? Server Time
4 Aug 2024 10:20:58 EDT (-0400)
  Re: Scaling macros?  
From: gonzo
Date: 1 Aug 2003 14:20:01
Message: <web.3f2aae259c12b543a0c272b50@news.povray.org>
Christopher James Huff wrote:
>In article <web.3f26e01d9c12b543a0c272b50[at]news.povray.org>,
>
>You could also base them all off of one value:
>
>#declare m = 1;
>#declare cm = m/100;
>#declare mm = m/1000;
>#declare km = m*1000;
>#declare in = m/0.0254;
>#declare ft = in*12;
>#declare yd = ft*3;
>#declare mi = km/1.607347;
>
>This way, you only have one constant to change...the number of units in
>a meter, in this case. If everyone uses the same unit names, all you
>have to do is change that value. (or just remove it and place it
>elsewhere, such as in a "units.inc" file)
>


Yes, that is what I meant.  I define Ft = 1 unit, then everything else is
based on Ft.  So far I haven't used much past yards though... guess I need
to expand my horizons to get into light years ;-)

RG


Post a reply to this message

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