Suppose I have two triangles relatively close together (so they probably shouldn't really be treated as point masses). I want to calculate the gravitational force (and potentially torque?) generated between the two bodies in the 2D plane.
For spheres/circles you can just treat them as point masses and go from there, but can you do that for arbitrary triangles (or tetrahedrons in 3D)?
I know the answer is probably to do a spatial integral across both triangles, but it's been a long time since I knew how to do that :)
The end goal is to be able to compute the gravitational force between arbitrary polygons/polyhedra. I figured decomposing it in to triangles/tetrahedrons would be a good start.
...
UPDATE:
Okay, my multidimensional calculus is a bit rusty, but I think this is a promising direction:
Let: $$\vec{f} = (a - c) \mu_1 + (b - c) \upsilon_1 - (x - z) \mu_2 - (y-z) \upsilon_2 - (z - c)$$ be the separation vector between two points on either triangle,
where $a, b, c$ are the vertices of triangle 1, and $\mu_1, \upsilon_1$ are the barycentric coordinates (corresponding to $a$ and $b$) for the point on triangle 1. Likewise for $x, y, z$ and $\mu_2, \upsilon_2$ for triangle 2. Using the barycentric coordinates let's us form the spatial integral to arrive at an answer.
So the (linear, non-torque) force between them is proportional to:
$$\vec{F_G} = \displaystyle\int_0^1 \int_0^{1-v_2} \int_0^{1} \int_0^{1-v_1} \! \frac{f}{||{f}||^3} \, \mathrm{d} \mu_1 \mathrm{d} \upsilon_1 \mathrm{d} \mu_2 \mathrm{d} \upsilon_2 $$
I think this admits a closed form solution, though I'm still wrestling with Mathematica. I'd really be surprised if this integral hasn't been done somewhere before, though.