4 ms·
I would expect the energy minimization approach to perform better than anything else, for vectors distributed uniformly on the surface of the N-sphere. Why go w
by alanbernstein 5y ago
I would expect the energy minimization approach to perform better than anything else, for vectors distributed uniformly on the surface of the N-sphere. Why go with the Fibonacci sphere instead?
- 10000truths 5y agoThe Fibonacci sphere arrangement has the advantage that the point coordinates can be computed from a function, so you don't even need a lookup table to decode: def fibonacci_sphere_point(idx, num_points): i = idx + 0.5 phi = math.acos(1 - 2 * i / num_points) golden_ratio = (1 + 5 ** 0.5) / 2 theta = 2 * math.pi * i / golden_ratio sin_phi = math.sin(phi) cos_phi = math.cos(phi) sin_theta = math.sin(theta) cos_theta = math.cos(theta) return ( cos_theta * sin_phi, sin_theta * sin_phi, cos_phi, ) If you're willing to forgo using a spatial acceleration structure and instead do an O(n) scan for encoding, then you can get O(1) space complexity.
- alanbernstein 5y agoAhh, I get it, neat.
- extremelearning 5y agoOne reason/situation where the Fibonacci method is preferred is because it is a direct construction method, which can be coded in a few lines, rather than an indirect iterative method. The second is that because an energy minmization method is minimizing the sum of forces, it more closely minimizes average distance between points, rather than absolute minimum distance which is what packing distance focuses on. As I describe in the article, different methods produce similar but slightly different solutions. An optimal solution for one objective function, may not be the optimal for a different objective function. I then give details about how the solution that optimizes volume of the convex hull is different to the solution that optimizes for packing distance, etc.
- phkahler 5y agoOne advantage is that you can use arbitrary N. If you just want N in a certain range, we can use the triangle-based polyhedron and successively quadruple or triple the number of faces. Then use the face normals as points. This gives visually appealing distributions without any real oddities.