Page 1 of 1

Volume calculator

Posted: Wed Nov 10, 2004 11:37 pm
by Antares
If just finished the first version of a volume calculator, which uses VRML files.
Perhaps you want to test it:

The next days i will include a surface calulation as well, but currenlty i am just too tired icon_frown.gif

Some notes on this programm:
where step is a floating point unit and is meant for the size of cubes which will "fill" the mesh
2.The programm is designed for konvex meshes
3.I havent done any optimisations yet, thus only LOW POLY models < 5000 faces should be used.
4.Extremley low poly models give wrong values, especially if they have sharp edges.
5.Export only meshes (no materials, no lamps, ...). I havent included a lot options in my parser yet :(

Perhaps somebody will find it usefull. I've done some testing and with the right settings (step+mesh) it is about 98% accurat. Enough for a general volume information i guess.

Posted: Thu Nov 11, 2004 2:57 am
by z3r0_d
umm, I hope this doesn't disappoint you

but there is a very nice generic technique [for closed meshes, they don't have to be convex] where you pretty much sum the prisms of each triangle and the origin [which end up negative if the verts go a different way].

a search didn't reveal that particular thread though

I did find

iirc it was the determinant of the 3 points

ah, here we go: ... _id=279606
[see last post]

Posted: Thu Nov 11, 2004 9:48 am
by Antares
Thanx for those links
It's no problem :) This programm was mainly meant for practice and i wanted to share it, that's all.

I tested one of my own idea how to calculate the volume, but of there are better ones, then i should use those ^^

i just implemented what that guy in the last post (link) suggested and it works great
Thanx again :)

i am so proud :lol: (preview):