• Advertisement

Archived

This topic is now archived and is closed to further replies.

Volume of a model

This topic is 5859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Has anyone created a funciton that can calculate the volume of a object/model? Im trying to figure out a way to do this now, if anyone can give me some suggestions, thanks.

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by mess
Has anyone created a funciton that can calculate the volume of a object/model?

Im trying to figure out a way to do this now, if anyone can give me some suggestions, thanks.


I have not done this myself, but I remember reading somewhere of a way to do it, but it only works with convex objects. You''ll need to sub-divide concave objects into convex objects to get the correct results.

Basically, you pick any point that lies inside the object. Then you create 3D "slices" of all triangles and the one point. All slices point towards the single point. Now I don''t know what the formula is for calculating the volume of this slice, but I''m sure it''s not too hard to figure out. You basically have an object with 4 sides, each which is a triangle of known size.

Maybe some of the math gurus here can give you that part of the equation. Then just add up all those results.

SS

Share this post


Link to post
Share on other sites
yep, i guess thats the only way, cool thanks, oh and if anyone finds working code that does this if u can please paste it here thanks.

Share this post


Link to post
Share on other sites

  • Advertisement