MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: random points!

  • To: mathgroup at
  • Subject: [mg80938] Re: random points!
  • From: Szabolcs <szhorvat at>
  • Date: Thu, 6 Sep 2007 05:19:46 -0400 (EDT)
  • Organization: University of Bergen
  • References: <fblj4r$p97$>


I think that this is the simplest solution:

dimitris wrote:
> How can I add as much points as possible inside the half-circle
> (so that there are not so big white regions as in the previous
> drawing)

pts = Table[{Random[Real,{-1,1}], Random[Real,{-1,1}]}, {10000}];

> assuring that they are not situated outside it?

pts = Cases[pts, {x_,y_} /; Sqrt[x^2+y^2] < 1 && y < 0];

Graphics[Point/@pts, AspectRatio -> Automatic] // Show


  • Prev by Date: Re: Slow Show/Graphics in v6.0
  • Next by Date: Re: random points!
  • Previous by thread: Re: random points!
  • Next by thread: Re: random points!