{
  "id": 4009486,
  "title": "Hilariously Fast Volume Computation with the Divergence Theorem (2018)",
  "url": "https://urgent.news/2026/08/28/hilariously-fast-volume-computation-with-the-divergence-theorem-2018",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-28T16:13:15.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://alyssarosenzweig.ca/blog/hilariously-fast-volume-computation-with-the-divergence-theorem.html"
  },
  "original_language": "en",
  "account": "The article details an efficient algorithm, attributed to the divergence theorem, for computing the volume of a simple, closed, triangulated 3D mesh. By choosing a vector field F(x, y, z) = x, 0, 0, the divergence of F equals 1, enabling the application of the divergence theorem. This theorem converts the volume integral into a surface integral over the 3D mesh's boundary.\n\nThe authors then represent the mesh as a collection of triangles T_i, using vertices Ti0, Ti1, and Ti2 for each triangle. By parametrizing each triangle using u and v coordinates, they transform the surface integral into a double integral. Simplifying this double integral, they extract the x-component of the cross product of the triangle edges, which remains constant throughout the triangle.\n\nThe final volume formula is derived as: V = (1/6) * ∑(Δi1 × Δi2)_x * (Ti0x + Ti1x + Ti2x), where the sum is over all triangles in the mesh. The algorithm is O(n) in complexity, with a single loop over the mesh's triangles and minimal per-triangle computations. This makes it highly efficient for real-time applications, such as calculating volumes every frame in a high-performance system. The authors also note that similar algorithms may exist, citing a paper by Cha Zheng and Tsuhan Chen, which describes an equivalent approach using a different derivation.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Hacker News",
        "title": "Hilariously Fast Volume Computation with the Divergence Theorem",
        "url": "https://urgent.news/2026/08/28/hilariously-fast-volume-computation-with-the-divergence-theorem",
        "published": "2026-08-28T09:00:46.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}