How can I calculate the volume of a mesh?
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
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.
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.
How do I set my laser printer on stun?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement