POV-Ray : Newsgroups : povray.binaries.scene-files : General purpose Scale_Converter macro : General purpose Scale_Converter macro Server Time
1 Sep 2024 12:19:05 EDT (-0400)
  General purpose Scale_Converter macro  
From: Charles C
Date: 1 Dec 2006 19:05:00
Message: <web.4570c25ad5e52cf5e451c5d90@news.povray.org>
In
http://news.povray.org/povray.general/message/%3C45706af4%40news.povray.org%3E/#%3C45706af4%40news.povray.org%3E
Sherry Shaw mentioned:

"I wonder if some sort of generic unit conversion code might be posted on
the site, to allow coders to use the units they find most appropriate,
while simplifying end-users' ability to mix-and-match #include files...?

I still think that scaling between measurement systems is a fact of life but
this could be a convienience & it sounded like fun so I came up with the
this...   Calling this macro from inside an object or union will scale it
approprietely given two unit types, e.g. "cm" & "mi". It's easy to expand
to cover whatever linear units I didn't think to include.

Comments?


Charles


Post a reply to this message


Attachments:
Download 'scale_convert.inc.txt' (4 KB)

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