POV-Ray : Newsgroups : povray.general : Object "center of mass" macro : Re: Object "center of mass" macro Server Time
30 Jul 2024 12:25:28 EDT (-0400)
  Re: Object "center of mass" macro  
From: Alain
Date: 7 Sep 2009 14:40:44
Message: <4aa553ac$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
I agree, over 99.999% of the time, only changing the axis used should be 
all that's needed.


Alain


Post a reply to this message

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