From: Caleb Clausen Date: 2010-06-22T07:45:41+09:00 Subject: Re: [QUIZ] Random Points within a Circle (#234) On 6/19/10, Daniel Moore wrote: > The quiz this week > is to generate random points uniformly distributed within a circle of > a given radius and position. def random_point_in_a_circle(x,y,r) angle=rand*2*Math::PI r*=rand x+=r*Math.sin(angle) y+=r*Math.cos(angle) return x,y end 7 lines, 5 minutes, 0 tests or visualizations. Super-easy.