Thanks!
There are many points in our plot. I want to choose the points which
distance to one point (e.g.(100,200)) is less than 10.
And I want to draw a circle (radinus=10). The centre of the circle is the
point (100,200).


On 4/22/06, Gabor Csardi <csardi@rmki.kfki.hu> wrote:
>
> Hmmm, could you explain this a bit?
> You want to add a circle to a plot? See the examples in help(symbols)
>
> Or you want to calculate the coordinates of the points on a circle?
>
> t <- seq(0,2*pi,length=100)
> coords <- t(rbind( 10+sin(t)*2, 20+cos(t)*2))
> plot(coords)
>
> Here (10,20) is the center of the circle, and 2 is its radius.
> If you set length to a bigger number you'll get smoother resolution.
>
> A points (x,y) is inside the circle if (c1-x)^2+(c2-y)^2 < r^2
> (c1, c2) is the center of the circle, r is its radius.
>
> Gabor
>
> On Sat, Apr 22, 2006 at 01:42:46PM -0400, Jian Zhang wrote:
> > how to draw a circle (e.g. radius=10cm) of one point?
> > And how to choose these points in the circle?
> > Thanks!
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
> --
> Csardi Gabor <csardi@rmki.kfki.hu>    MTA RMKI, ELTE TTK
>

	[[alternative HTML version deleted]]


