Hacker News

Hilariously Fast Volume Computation with the Divergence Theorem

Book Excerpt: In 'Impossible Dreams,' a Movie Buff Makes Mind ...

(No, there won’t be jokes.) The following presents a fast algorithm for volume computation of a simple, closed, triangulated 3D mesh. This assumption is a consequence of the divergence theorem. Further extensions may generalise to other meshes as well, although that is presently out of scope. We begin with the definition of volume as the triple integral over a region of the constant one: V=∭R1dVV = iiint_R 1 mathrm{d}V Let 𝐅mathbf{F} be a function in ℝ3mathbb{R}^3 such that its divergence is equal to one. For the purposes of this paper, we choose: 𝐅(x,y,z)=<x,0,0>mathbf{F}(x, y, z) = <x, 0, 0> It can easily be verified that div𝐅=∂F∂x+∂F∂y+∂F∂z=1+0+0=1mathrm{div} mathbf{F} = frac{partial F}{partial x} + frac{partial F}{partial y} +…

Continue reading at Hacker News alyssarosenzweig.ca
Advertisement