top | item 25322154

(no title)

zarang | 5 years ago

Although the rejection method easily generalises, for higher dimensions say d>8, it becomes extremely inefficient and so may become unduly slow.

discuss

order

pontus|5 years ago

Yes, 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.