POV-Ray : Newsgroups : povray.advanced-users : volume calculations : Re: volume calculations Server Time
6 Oct 2024 16:13:45 EDT (-0400)
  Re: volume calculations  
From: Daniel Nilsson
Date: 10 Jan 2007 16:55:31
Message: <45a560d3$1@news.povray.org>
Rune wrote:
> Daniel Nilsson wrote:
>> Tim Attwood wrote:
>>> 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.
> 
> This would require exactly the same amount of insideness tests as the 
> suggestion by Tim Attwood; only they would be done during rendering instead 
> of during parsing.

Yes, that is true. But povray's built-in adaptive anti-aliasing will 
save some samples. Implementing adaptive sampling in SDL is probably not 
as fast.
Anyway, I don't think this is what the OP was looking for.

-- 
Daniel Nilsson
haven't really used povray for several years, still lurking here though


Post a reply to this message

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