POV-Ray : Newsgroups : povray.text.scene-files : Optimized FindObjectCenter Macro Server Time
19 Apr 2024 12:50:03 EDT (-0400)
  Optimized FindObjectCenter Macro (Message 1 to 1 of 1)  
From: CShake
Subject: Optimized FindObjectCenter Macro
Date: 7 Sep 2009 23:36:16
Message: <4aa5d130$1@news.povray.org>
This macro will find the center of mass of an arbitrary object, capable 
of dealing with any type of object that pov can render. This macro has 
an efficiency of O(k*n^2), instead of the 'naive' approach of O(n^3).

Further explanation of how this macro works can be found in the comments 
in the code, and in the p.general thread 
http://news.povray.org/povray.general/thread/%3C4aa18d71%241%40news.povray.org%3E/

CShake


Post a reply to this message


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

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