Consider a sliver from (0, 0, 0) to (1, 0, 0) with density x^{2} at (x, 0, 0).
Its mass is ⅓.
We call it the “unit sliver”.
The gravitational potential at point (x, y, 0) is p(x, y^{2}) =

∫[λ=0: λ=1] λ^{2}/√((x−λ)^{2} + y^{2}) dλ
= (3x(f−g) + f + (2x^{2} − y^{2})(log((f−(x−1))/(g−x))))/2
where:

f = √((x−1)^{2} + y^{2})

g = √(x^{2} + y^{2})

f is the distance from the pointy end of the unit sliver and g from the heavy end at the surface.
The y^{2} in p(x, y^{2}) is merely a hack to avoid an unnecessary square root.

Turns out that we don’t need even this simpler formula but it is nice to have around.

This code corroborates these formulae.
`(slp3 x y z)` is the potential of the unit sliver at point (x, y, z).

That is the unit sliver but we need to compute the potential field for slivers rotated about the origin of various thickness and lengths.
The volume V of the native sliver is easy to compute and V=m since we presume that the density is 1.
Also available is the vector A from the origin to the centroid of the small face of the tetrahedron for which the sliver is a surrogate.
We need a computable function P(A, B) so that 3mP(A, B) is the potential at point B, produced by the sliver with mass m whose heavy end is at A.

1. P((1, 0, 0), (x, y, 0)) = p(x, y^{2})

2. P((1, 0, 0), (x, a, b)) = P((1, 0, 0), (x, c, d)) if a^{2} + b^{2} = c^{2} + d^{2}

3. P(UA, UB) = P(A, B) where U is any orthogonal matrix.

4. P(sA, sB) = s^{2}P(A, B) for any real s.

Equation 2 merely expresses the symmetry of the configuration.
Equation 3 follows from freedom to choose any orthonormal coordinate system.

Geometric intuition tells me that

P(A, B) = (A∙A)p((A∙B)/(A∙A), ((A×B)/(A∙A))∙((A×B)/(A∙A)))

but see this which relies on this framework.
`os` is a random 3 by 3 orthogonal matrix,
`mxm` is matrix multiply,
`(ip A B)` is inner product A∙B,
`(cp A B)` is Gibb’s cross product A×B,
`(sm x A)` is scalar multiplication of scalar x by vector A,
`P` and `p` are as here.
We confirm our defining equations.

One array, L, whose length is three times the number of slivers, holds three entries per sliver. Each entry is an index into L or −1. This is where the linked lists live. Each sliver has 3 defining vertices and must provide link space for those.

The intense computation is computing the potential produced by the collective slivers at each vertex. As we seek the minimal energy configuration we adjust two or more vertex locations at a time and recompute vertex potentials everywhere. Probably it is good to keep the potentials and compute the adjusted potentials everywhere by computing the potential change due to a vertex change. (Maybe a SB*VN array of potential contributions of sliver j to vertex k??)

See this too.

Generate a spherical blob from triangles.

potential function with two vector arguments,
corroboration of same

Physics