[EM] Exact volume of a simplex
Daniel Carrera
dcarrera at gmail.com
Sun Feb 6 11:30:15 PST 2022
It turns out that computing the volume of a simplex is surprisingly easy:
https://www.mathpages.com/home/kmath664/kmath664.htm
Let {vk} for k=0...{N+1} be the N+1 vectors that make the vertices of the
N-simplex.
Let B be the (N+1)x(N+1) matrix whose rows are `1` followed by the elements
of {vk}.
The volume of the simplex is:
Volume = det(B) / N!
This is so easy, I don't understand why the Polytope library doesn't do it
this way. In any case, this means that Kristofer's original idea of
computing the volumes of polytopes exactly and using that as your spatial
model should be computationally efficient. You just have to split your
Voronoi cells into simplices, which isn't too hard either.
For my own idea of having a voter density function, it is less clear that
this is helpful. Earlier I posted a way to generate uniform points within
an N-simplex but this isn't automatically a good idea because the algorithm
requires a lot of Nth roots. It might be computationally cheaper to use my
previous method of spreading points uniformly across the bounding box of
the simplex and selecting the points that fall inside the simplex.
Cheers,
--
Dr. Daniel Carrera
Postdoctoral Research Associate
Iowa State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.electorama.com/pipermail/election-methods-electorama.com/attachments/20220206/be32feec/attachment.html>
More information about the Election-Methods
mailing list