POV-Ray : Newsgroups : povray.advanced-users : volume calculations : Re: volume calculations Server Time
6 Oct 2024 14:46:51 EDT (-0400)
  Re: volume calculations  
From: Daniel Nilsson
Date: 10 Jan 2007 13:20:51
Message: <45a52e83$1@news.povray.org>
Tim Attwood wrote:
>> Is there a way to calculate and/or export the internal volumes of the 
>> finite
>> CSG objects in a POV-Ray scene?
> 
> Using extents of an object you can calculate the
> volume of the bounding box, then use a large number of
> random point samples within the bounding box to determine
> the percent of samples that are inside the object, then
> the volume can be estimated to be that percent of the
> bounding volume. This is sort of like filling a real object
> with water then measuring the water.


A better way to sample the volume (although requiring external 
processing) may be to render a series of slices of the object and then 
sum the number of covered pixels in those images. This can be done using 
an object pattern mapped to a plane and animating the translation of the 
pattern along the axis perpendicular to the plane, much like a CAT-scan 
really.

-- 
Daniel Nilsson
going back to lurking mode...


Post a reply to this message

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