Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.63.0505191409390.20150@dns.unife.it>
Date: 2005-05-19T12:10:45Z
From: Josef Eschgfaeller
Subject: Drawing a circle
In-Reply-To: <428C6714.9080702@telecom.com.co>

Mario Morales wrote:

> I need to draw a circle

I would do it with complex numbers
and polar coordinates:

Circle = function (t,a)
{a*cos(t)+1i*a*sin(t)}

interval=c(-8,8)
plot(interval,interval,type="n",xlab="",ylab="",
   asp=1,axes=F)
t=seq(0,2*pi,by=0.01)
center=2+3i; radius=5
lines(center+Circle(t,radius))
locator(1)
dev.off()

Josef Eschgf??ller
-- 
Josef Eschgf??ller
Dipartimento Matematico
Universita' di Ferrara
http://felix.unife.it