POV-Ray : Newsgroups : povray.binaries.scene-files : Scene Ruler : Re: Scene Ruler Server Time
1 Sep 2024 12:15:44 EDT (-0400)
  Re: Scene Ruler  
From: Randall Sawyer
Date: 29 Nov 2006 01:05:00
Message: <web.456d21e2f3e082022441c7220@news.povray.org>
"nemesis" <nam### [at] gmailcom> wrote:
> except in the case of whales, buildings and other huge objects. :)

Good point, nemesis.  I'll address that in a moment.  But first, I
discovered a minor bug in my code.

Line 36 reads:
    #local d = floor( min( max( dir, 0 ), 4) );
It should read:
    #local d = floor( min( max( dir, 0 ), 3) );

Now as to nemesis's good point...

I (or any povver with my "ruler.inc") could modify the macro to include an
additional float parameter which expresses a scale.  Let's call this
parameter 'unit_scale'.  Perhaps we could include an additional string
parameter.  Let's call that one 'unit_tag'.

Now, a user could call a ruler() with 'len' = 10000, 'tick_interval' = 200,
'number_interval' = 1000, 'unit_scale' = 1000, and 'unit_tag' = "K".  Then,
the ruler object would appear with the numbers '0' through '10' etched on
its surface with four short ticks between every two consecutive numbers -
AND - on or beside the ruler would appear a text-based object which reads
"1:1000" or maybe "1:1K".

More about "Scene Ruler":
I might revise my current "ruler.inc" file.  Or, I might just make something
better.  I'm thinking about 1D and 2D transparent rulers with ticks and
numbers floating in space.


Why I believe that "scene ruler objects" are a worthwhile pursuit:

Imagine you've gone to the "Public Includes Library" (or whatever it ends up
being called) on the povray.org site, looking for some nice wood textures.

Imagine that you get to view a rendered sample scene of some attractive
blocks of wood which shows you what you'll get if you download povver A's
"woods.inc" file.

Suppose that the scenes you create are in terms of centimeters, but -
unbeknownst to you - povver A creates scenes using cubits.

So, you download the file, create a new scene to try out one of these new
textures, and end up with objects that look like they're made of bland mud.
 Then, you spend the afternoon trying different scale values for the
textures until you get the one that's just right.

Now, image that povver B also has some attractive wood textures to share.
Povver B's sample scene of attractive blocks includes a ruler object off to
the side.

Looking at the blocks in the scene and at the density of their textures, you
think to yourself, "Those blocks are probably 3 cm x 4cm each."  But then,
you glance over at the ruler and see that by povver B's metric, they are
actually about 0.1 x 0.13 each.  (By the way, povver B renders scenes in
terms of feet.  But, you don't need to know that.)  All you need to know is
to scale povver B's textures by 3/0.1 = 30 and you're good to go!

Perhaps the new "Includes Library" will have a section for "Ruler Macro
Includes."


Post a reply to this message

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