|
|
OJCIT nous apporta ses lumieres en ce 09-01-2007 16:40:
> Thorsten Froehlich <tho### [at] trfde> wrote:
>> OJCIT wrote:
>>> Is there a way to calculate and/or export the internal volumes of the finite
>>> CSG objects in a POV-Ray scene?
>> <http://tag.povray.org/povQandT/languageQandT.html#wireframes>
> Thanks for the quick response, but that's not quite what I meant. I don't
> need to export the surfaces, but I was wondering if there were a way to get
> the numerical volume of each solid entity in my scene (i.e., if I filled
> them with water, how much would they hold?). For this purpose I'm only
> talking about discrete primitives and objects created by union and
> difference operations among them.
> For example, I might have a model with a cylinder with a box subtracted from
> it, and want to know the resulting volume. Since the SDL allows much more
> complexity than what I use it for, and since there is seamless integration
> of infinite primitives, I wouldn't think that's a number that gets computed
> in the normal course of things.
> My limited understanding seems to be that ray tracers are more interested in
> surfaces than interior volumes, and that there's not a concept of internal
> mass or material, except for the purposes of diffraction, translucence,
> etc. If photons don't need to know it, I'm guessing it doesn't get
> computed.
You can't get the volume of an object directly. You can calculate it for a
primitive, using the trigonometric formulaes.
Obvious for a box, a cylinder, a torus or a sphere, easy for most simple solids.
It would be a real headache for a blob with more than 1 components...
You can only gues it for SCG objects in non-trivial cases, you can hardly know
what percentage of any object actualy add or substract from the total volume.
--
Alain
-------------------------------------------------
If you pick up a starving dog and make him prosperous, he will not bite you;
that is the principal difference between a dog and a man.
Mark Twain
Post a reply to this message
|
|