POV-Ray : Newsgroups : povray.general : Object "center of mass" macro : Re: Object "center of mass" macro Server Time
30 Jul 2024 06:24:47 EDT (-0400)
  Re: Object "center of mass" macro  
From: CShake
Date: 6 Sep 2009 23:07:06
Message: <4aa478da$1@news.povray.org>
Alain wrote:
> 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

Good idea, I'll look at implementing that. It will be a lot more work to 
make it an arbitrary axis (with how I'm using the grid from one side of 
the bounding box), but I figure that a choice of x,y,z should be enough 
for most uses. Anything more and it's just as easy to rotate the object, 
call the macro, then rotate it back and transform the returned location.

Chrsi


Post a reply to this message

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