|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is there an automatic way to calculate the volume of a 3d mesh?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greg M. Johnson wrote:
>
> Is there an automatic way to calculate the volume of a 3d mesh?
For each triangle, take the following matrix:
[A.x A.y A.z]
[B.x B.y B.z]
[C.x C.y C.z]
Where A, B, and C are the vertices of the triangle. Make sure that
the order from A to B to C goes in the same direction for each triangle
(either clockwise or counter-clockwise) when viewed from the outside
of the mesh.
Take the determinant of this matrix. Divide it by six. If the
determinant is negative, leave it that way.
Add up all of the determinants for all of the triangles. Divide by
six. If the sum is negative, make it positive. The result is the
volume of the mesh.
Note that every edge *MUST* be shared by exactly TWO triangles, or the
sum will be entirely meaningless.
Hope this helps,
John
--
ICQ: 46085459
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"John VanSickle" <van### [at] erolscom> wrote :
> Greg M. Johnson wrote:
> >
> > Is there an automatic way to calculate the volume of a 3d mesh?
>
> For each triangle, take the following matrix:
>
Wait a minute... are you saying that if (for instance) I were to go into
Rhino, make an unusual shape, export it to POV and then do as you describe,
I would get the volume of that unusual shape? Please say yes.... It would
give me an excuse to buy Rhino.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bill DeWitt wrote:
> Wait a minute... are you saying that if (for instance) I were to go into
> Rhino, make an unusual shape, export it to POV and then do as you describe,
> I would get the volume of that unusual shape? Please say yes.... It would
> give me an excuse to buy Rhino.
That's the only excuse you need to buy Rhino ?
--
Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ken" <tyl### [at] pcabellnet> wrote :
>
> That's the only excuse you need to buy Rhino ?
>
That is the one I need to get it past my Poverty Filter. If I could use
it to even possibly, maybe, someday help my income -somehow-, I could
rationalize the rest.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Just buy MAX, it'll do that for you and then be able to apply dynamics to
all the objects in your scene :) Oh, plus it'll find the pivot point
center-of-gravity for any object too, ain't that handy :)
--
Lance.
The Zone - http://come.to/the.zone
Bill DeWitt <the### [at] earthlinknet> wrote in message
news:3850378c@news.povray.org...
>
> "Ken" <tyl### [at] pcabellnet> wrote :
> >
> > That's the only excuse you need to buy Rhino ?
> >
>
> That is the one I need to get it past my Poverty Filter. If I could
use
> it to even possibly, maybe, someday help my income -somehow-, I could
> rationalize the rest.
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Lance Birch wrote:
>
> Just buy MAX, it'll do that for you and then be able to apply dynamics to
> all the objects in your scene :) Oh, plus it'll find the pivot point
> center-of-gravity for any object too, ain't that handy :)
If MAX is so great why doesn't it offer direct file support for POV-Ray
like Rhino does at a fraction of the cost ?
--
Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Because it's built to export to RenderMan :) hehehe
--
Lance.
The Zone - http://come.to/the.zone
Ken <tyl### [at] pcabellnet> wrote in message
news:385### [at] pcabellnet...
>
>
> Lance Birch wrote:
> >
> > Just buy MAX, it'll do that for you and then be able to apply dynamics
to
> > all the objects in your scene :) Oh, plus it'll find the pivot point
> > center-of-gravity for any object too, ain't that handy :)
>
> If MAX is so great why doesn't it offer direct file support for POV-Ray
> like Rhino does at a fraction of the cost ?
>
> --
> Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Boy, you are a math whiz! But I'm slightly confused in your notation, it's
almost as if you wrote three matrices instead of one. By "determinant of
this matrix", you mean:
A.x * B.y * C.z + .....
Will pov or one of your macros do this calc for me?
John VanSickle wrote:
> Greg M. Johnson wrote:
> >
> > Is there an automatic way to calculate the volume of a 3d mesh?
>
> For each triangle, take the following matrix:
>
> [A.x A.y A.z]
> [B.x B.y B.z]
> [C.x C.y C.z]
>
> Where A, B, and C are the vertices of the triangle. Make sure that
> the order from A to B to C goes in the same direction for each triangle
> (either clockwise or counter-clockwise) when viewed from the outside
> of the mesh.
>
> Take the determinant of this matrix. Divide it by six. If the
> determinant is negative, leave it that way.
>
> Add up all of the determinants for all of the triangles. Divide by
> six. If the sum is negative, make it positive. The result is the
> volume of the mesh.
>
> Note that every edge *MUST* be shared by exactly TWO triangles, or the
> sum will be entirely meaningless.
>
> Hope this helps,
> John
> --
> ICQ: 46085459
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#macro Determinant( A, B, C )
(A.x * B.y * C.z + A.y * B.z * C.x + A.z * B.x * C.y -
A.x * B.z * C.x - A.y * B.x * C.z - A.z * B.y * C.x)
#end
On Fri, 10 Dec 1999 09:09:55 -0500, Greg M. Johnson wrote:
>Boy, you are a math whiz! But I'm slightly confused in your notation, it's
>almost as if you wrote three matrices instead of one. By "determinant of
>this matrix", you mean:
>
> A.x * B.y * C.z + .....
>
>Will pov or one of your macros do this calc for me?
>
>John VanSickle wrote:
>
>> Greg M. Johnson wrote:
>> >
>> > Is there an automatic way to calculate the volume of a 3d mesh?
>>
>> For each triangle, take the following matrix:
>>
>> [A.x A.y A.z]
>> [B.x B.y B.z]
>> [C.x C.y C.z]
>>
>> Where A, B, and C are the vertices of the triangle. Make sure that
>> the order from A to B to C goes in the same direction for each triangle
>> (either clockwise or counter-clockwise) when viewed from the outside
>> of the mesh.
>>
>> Take the determinant of this matrix. Divide it by six. If the
>> determinant is negative, leave it that way.
>>
>> Add up all of the determinants for all of the triangles. Divide by
>> six. If the sum is negative, make it positive. The result is the
>> volume of the mesh.
>>
>> Note that every edge *MUST* be shared by exactly TWO triangles, or the
>> sum will be entirely meaningless.
>>
>> Hope this helps,
>> John
>> --
>> ICQ: 46085459
>
>
>
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |