POV-Ray : Newsgroups : povray.programming : How find the volume of an object? : How find the volume of an object? Server Time
1 Jun 2024 16:38:50 EDT (-0400)
  How find the volume of an object?  
From: Chris Kinata
Date: 21 Sep 2005 14:26:52
Message: <4331a5ec@news.povray.org>
Hi all...

What is the best method in POV-Ray for finding the
volume of a simple convex (that is, no hollows or cavities)
object that is the intersection of two other objects?

One way might be to iteratively intersect this object
with a series of long thin boxes incremented
along (for example) the xy plane, and use the Extents macro
in shapes.inc to get the length of the box. Summing these
box volumes would return a total volume slightly larger
than the real volume.

Another way might be to use the Isect macro to get
the intersection points at each corner of each "box"
and calculate the volume of the resulting polyhedron.

Is there an easier way to do this?

Regards,
Chris

-- 
||||| www.kinata.net web design and hosting


Post a reply to this message

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