4 ms·
Although the rejection method easily generalises, for higher dimensions say d>8, it becomes extremely inefficient and so may become unduly slow.
by zarang 6y ago
Although the rejection method easily generalises, for higher dimensions say d>8, it becomes extremely inefficient and so may become unduly slow.
- pontus 6y agoYes, that's right. I haven't verified it but suspect that you might be able to improve on this by generating the coordinates in order, constantly decreasing the range to ensure that the point falls within the sphere. Then, to ensure spherical symmetry, you randomly shuffle the points at the end.