POV-Ray : Newsgroups : povray.advanced-users : About mm_per_unit : Re: About mm_per_unit Server Time
3 May 2024 20:11:05 EDT (-0400)
  Re: About mm_per_unit  
From: clipka
Date: 9 Dec 2015 18:46:43
Message: <5668bd63$1@news.povray.org>
Am 09.12.2015 um 21:10 schrieb Alain:
> Presently, you can't use mm_per_unit in a scene.
> You can't use it in a #declare as follow:
> #declare Dimention = Something * mm_per_unit;
> or in a scale statement.

I guess what you want would be

    #declare Dimension = Something / mm_per_unit;

> It would be nice if it could be made accessible as a builtin constant
> like pi.
> 
> That could be usefull to create objects that can auto scale according to
> the scale of the scene.
> The author of the scene would only need to set that value in the
> global_settings, and an imported object could scale itself, adjusting a
> fade_distance or media density accordingly.

Why not simply declare a suitable variable yourself, and use it like this:

    #declare mm = 10; // one millimeter in POV-Ray units
    global_settings {
      mm_per_unit 1/mm
    }
    ...
    #declare Dimension = Something * mm;


Post a reply to this message

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