1
$\begingroup$

I have n dimensional space. Let us say n=20 for your case. And I also have a point p1 in that space.

What I want to do is get a random point (newpoint) in that space such that distance(p1, newpoint)<=r, where r represents radius that I already know.

Thank you. Any feedback will be greatly appreciated.

  • 1
    Assuming you want a *uniform* distribution within the ball of radius $r$, [Nate Eldredge's answer here for the 3D case](http://math.stackexchange.com/a/87238/856) generalizes nicely to $n$ dimensions. Also, MathWorld has a page on [ball point picking](http://mathworld.wolfram.com/BallPointPicking.html) that gives a rather striking alternative approach.2012-10-25
  • 0
    Thank you! It is not as bad as I thought it would be!2012-10-25

0 Answers 0