Hilariously Fast Volume Computation with the Divergence Theorem

(alyssarosenzweig.ca)

72 points | by luu 2 hours ago

6 comments

  • eterevsky 1 hour ago
    Isn't the same as just taking every triangle from the mesh, calculating the volume of a prism-like polytope between it and its projection on one the planes, and then taking it with a + sign if its projection is oriented in one direction, and with a - sign if it's oriented in another? This kind of formula works based on the basic geometry.
    • Sharlin 2 minutes ago
      Yes, this is essentially what the author derived (by means of calculus rather than geometric argument but the result is unsurprisingly the same). The 2D analog is easy to grok: to compute the area of a polygon, find the sum of the signed areas of the trapezoids formed by each edge and its projection on the x-axis.
    • xigoi 26 minutes ago
      I wonder if this could be reversed to give an intuitive “proof” of the divergence theorem.
    • aaa_aaa 50 minutes ago
      Yes I remember doing something like that in 90s for a survey/map engineering cad application. After delaunay triangulation, calculating approximate voulume is easy. But this probably is a more general solution
  • elikoga 1 hour ago
    My belly says the naive formula is summing the triangle pyramid volumes to the origin with sign in orientation. It looks like that's what they derived. Which is a generalization of 2d polygon area calculated by summing triangle areas for each edge, I was taught this in a math camp where we calculated map polygon areas on gis data. I remember math knowledge being hard to get pre AI era but I didn't remember it being this hard.

    No idea what the author means by "which are equivalent to rendering the mesh and then sampling the render".

  • gurkwart 7 minutes ago
    There's a really elegant solution using Geometric Algebra, that to this day is one of the most satisfying things I've ever learnt. Steven de Keninck outlines it in his 2019 Siggraph talk [1].

    [1] https://youtu.be/tX4H_ctggYo?t=4795

  • arn3n 1 hour ago
    I love these kinds of posts. Simple, fast, AI-free, and I learn something new.
  • N_Lens 1 hour ago
    I'll accept any kind of jocularity in the current climate!
  • gigatexal 57 minutes ago
    Did they also work on the graphics stack for the Asahi project?
    • StilesCrisis 19 minutes ago
      Yup!
    • unkeen 36 minutes ago
      Sadly, there is no way to find out, f.ex. by a quick Google search.