POV-Ray : Newsgroups : povray.general : World size limits? : Re: World size limits? Server Time
30 Jul 2024 02:18:14 EDT (-0400)
  Re: World size limits?  
From: "Jérôme M. Berger"
Date: 2 Jan 2010 12:14:30
Message: <4b3f7ef6$1@news.povray.org>
David Given wrote:
> I'd very much like to use meaningful units where possible, simply to
> stop myself getting confused... at what point do the large numbers caus
e
> problems? Could I avoid the whole issue by, for example, constructing m
y
> model in metres or kilometres, scaling it to millions of kilometres or
> AUs, and adding it to the universe? Or am I basically unable to reliabl
y
> model objects in the metre scale and objects in the 10^9 metre scale at

> the same time?
> 
	No, you can't have both very big and very small objects at the same 
time. As for modelling with meaningful units, that's easy:

#declare m  = ...;
#declare km = 1000 * m;
#declare AU = 149.6e9 * m;

	And then always use the units when modelling as in:

sphere {
    0, // location
    6400 * km // radius
    ...
}

	Then you can adjust the internal representation by changing the 
declaration of "m".

> [...]
>> Changing to long doubles instead of double: the issue is that not only

>> the type must be changed in structure (easy), but that all functions
>> calls (for the maths) must be replaced with the relevant long double..
.
> 
> Oh, well, it was a thought. Probably wouldn't have helped much anyway.
> 
> Now, a version of Povray built to use bignums... *then* we'd be getting

> somewhere!
> 
	Given the render times it would have, I'm not sure that *getting* 
is the right word here ;)

		Jerome
-- 
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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