POV-Ray : Newsgroups : povray.general : Object "center of mass" macro : Re: Object "center of mass" macro Server Time
30 Jul 2024 06:22:18 EDT (-0400)
  Re: Object "center of mass" macro  
From: Alain
Date: 5 Sep 2009 18:48:15
Message: <4aa2eaaf$1@news.povray.org>


> True. I picked the 'orientation' of what direction to shoot the rays as 
> somewhat arbitrary. For most objects it should work fine, but I am aware 
> specifically that an image-based heightfield (since it normally rises up 
> from the x-z plane) will create a large number of intersections, and 
> would be more efficient to shoot along y. Considering the likelihood of 
> this sort of comparison, I may actually switch it to shooting along y, 
> since for 'normal' object it wouldn't make much of a difference.
> 
The orientation of the tests can be passed as a parameter,somewhat like 
the direction vector used by trace, or a global variable.
In the later case, you can have a default orientation that is used if 
the user don't set it.

That way, if the object been tested have a special shape, the direction 
can be chosen to be more effecient. After all, not all hightfields are 
used horizontaly.


Alain


Post a reply to this message

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