POV-Ray : Newsgroups : povray.binaries.images : PoVEarth, day #2 : Re: PoVEarth, day #2 Server Time
1 Aug 2024 12:19:06 EDT (-0400)
  Re: PoVEarth, day #2  
From: Jörg 'Yadgar' Bleimann
Date: 16 Jul 2008 18:47:23
Message: <487e7a7b$1@news.povray.org>
High!

Christian Froeschlin schrieb:

> BTW, you should familiarize yourself with scaling issues and
> floating point accuracy if those buildings are then intended
> to be placed on an earth-sized sphere.

In fact, I did!

// SCALE LEVEL VIEW FLAGS

#declare cosmic=0;
#declare global=0;
#declare regional=0;
#declare loc=1;
#declare microloc=0;

[...]

// SCALING FACTORS

#if (cosmic)
   #declare f=100000; // 1 POV unit = 100 kilometres
   #else
     #if (global)
       #declare f=1000; // 1 POV unit = 1 kilometre
       #else // regional, local and microlocal view
         #declare f=1;  // 1 POV unit = 1 metre
         #if (regional)
         #else
           #if (loc)
             #declare trans=<247.38, 0, 248>/f; // coordinate origin for 
local model
           #end
        #end
     #end
#end

// end of listing slice

I'm pretty aware that in the "global" model, the smallest object to be 
rendered correctly will be about 1 km/12500 = 8 cms across... probably I 
will "fine-tune" the scaling factors later on! In the long run, we also 
could hope for a smaller epsilon value with the version 4.0 - and, of 
course, faster CPUs!

See you in Khyberspace!

Yadgar


Post a reply to this message

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