2 ms·
Interestingly, it seems to be all about bending some distribution and then unbending it again. Orthogonal dimensions are independent, so choosing three random n
by wruza 8y ago
Interestingly, it seems to be all about bending some distribution and then unbending it again. Orthogonal dimensions are independent, so choosing three random numbers generates uniform in-cube distribution. But once you bend it via polar coordinates or vectors, you “wrap” many points of polar/vector abstract space to near the cartesian origin. And then you have to bend back, to make it uniform again. That raises interesting question on whether it relates to topology problems. Since generating N randoms is a fastest primitive operation, is there a quick and uniform translation from a cube to the sphere, such that all points are still uniform? Can we apply space-filling curve magic here (like Hilbert’s)? I feel like there is much more geometry power under that, but sadly I’m just a guy with no math bg.
- 3pt14159 8y agoIt's an interesting idea, but I think it would prove to be equivalent. As another commenter pointed out, the efficiency of this operation really only matters in higher dimensions. I bet a generative model would work, though it's tricky enough for me not to be able to think it through on the spot. Something like: 1. Pick a subset of points thus far generated at random. 2. From this subset, pick the point with the furthest distance from the origin. 3. Form a new unit sphere where r is 1-d of the picked point (ie, make a new sphere that is a subset of the parent sphere with a single touching point of the parent sphere). 4. Generate a new point in this subsphere using the normalized vector method. Not exactly the above, but something like it. The downside of the above approach is that I think it will create a distribution of points that may be unnaturally uniform. It would be interesting to define a set of equations that could benchmark different approaches for how well they compare to the in-cube strategy.