#### Archived

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

# How can I calculate the volume of a mesh?

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

## Recommended Posts

Hello! I''m not sure if you can help me because this is not a question which directly related to Opengl. But I don''t know who can help me. I''m developing a system to simulate the behavior of the water in a riverbed. The riverbed representation is done with Opengl in a Windows system. I need to calculate the volume of this riverbed and I don''t know how to do this. I suppose that there''ll be an algorithm that makes this task, but I haven''t found it yet. Can anybody help me? THANK YOU VERY MUCH, Verónica

##### Share on other sites
What does the riverbed look like?

If it''s a simple cuboid for example the volume would simply be width*breadth*depth.

The riverbed is most likely not of cuboid shape, but it will still be possible to approximate it''s shape by filling it with cuboids (or other).

That is: Break down the (most likely) irregular body of your riverbed into ''regular'' shapes (aka: a body with known mathmatical formular for it''s volume). The better you''re able to break down the body into simpler shapes, the better the approximation will be.

You''ll have to ask google on how to do that though
(Try ''finite element thesis'' for starters)

Since you''re working with OpenGL the riverbed will most likely be represented by triangles/quads? This could save you some trouble, by finding a clever way to combine those into tetrahedrons/cubes and adding their volumes up.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633660
• Total Posts
3013221
×