Jump to content
  • Advertisement


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

Veronica Fernandez

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.

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

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 this post

Link to post
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!