<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">It turns out that computing the volume of a simplex is surprisingly easy:</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><a href="https://www.mathpages.com/home/kmath664/kmath664.htm">https://www.mathpages.com/home/kmath664/kmath664.htm</a><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Let {vk} for k=0...{N+1} be the N+1 vectors that make the vertices of the N-simplex.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Let B be the (N+1)x(N+1) matrix whose rows are `1` followed by the elements of {vk}.</div><div><br></div><div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">The volume of the simplex is:</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">Volume = det(B) / N!</div></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">Cheers,</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="trebuchet ms, sans-serif">Dr. Daniel Carrera</font></div><div dir="ltr"><font face="trebuchet ms, sans-serif">Postdoctoral Research Associate</font></div><div><font face="trebuchet ms, sans-serif">Iowa State University</font></div></div></div></div></div></div></div></div></div></div></div>