1

In a project I'm planning to calculate the volume of an advanced 3D object by creating an array of 1x1 unit squares which make up a grid, passing that grid through the object and, every 1 unit of distance, running collision detection on each square with the object, so essentially we're really creating a cubed grid and running a simplified implementation of 1x1x1 cube collision detection throughout the object. Sum of volume of all collided cubes = volume of advanced 3D object.

Like so (the grid here is less subdivided for the sake of demonstration):

enter image description here

I can then control a balance between computational cost and accuracy by further subdividing the grid.

This seems like it would work but I wanted to make sure I wasn't making a mess of a task that could be much cleaner / simpler before I started. Is there a better way of calculating the volume of an advanced 3D object?

john doe
  • 547
  • 1
  • 6
  • 18
  • I wouldn't do it that way. I'd discretize it using finite elements and sum the volume of easily calculated elements. – duffymo Jan 05 '18 at 10:14
  • Do you have a 3D-Mesh Object? If so, have a look to a similiar question on SO:https://stackoverflow.com/questions/1406029/how-to-calculate-the-volume-of-a-3d-mesh-object-the-surface-of-which-is-made-up – codeteq Jan 05 '18 at 10:16
  • @codeteq thats very interesting, I read the paper that solution is based on just now and I'm having trouble figuring out whether it works with models which include 2D faces, or if the model needs to be a perfect set of 3D objects. Do you know? It's kind of important because many models that I need to measure aren't exactly perfect, there are some flat faces involved. – john doe Jan 05 '18 at 10:26
  • @codeteq For example: https://imgur.com/a/Mqc7V – john doe Jan 05 '18 at 10:36
  • @john doe can't see the picture – codeteq Jan 05 '18 at 10:37
  • @codeteq updated the correct link, view the comment again (refresh). – john doe Jan 05 '18 at 10:38
  • @john doe I would try the way and wouldn't mind about the 2D shapes that much as they haven't any volume either. – codeteq Jan 05 '18 at 10:41

0 Answers0