Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: How to draw an ellipse?




Krishnan Jayakrishnan wrote:

> Does any one know how to construct an ellipse? For example an ellipse
> centered at (0,0) with intercepts at (-a,0,(a,0),(0,-b),(0,b) with
> parametric equation
> x(t) = a*cos(t)
> y(t) = b*sin(t)
> with t increasin from 0 to 2pi radians. --

In[2]:=
x[t_] = a*Cos[t];
y[t_] = b*Sin[t];

In[3]:=
a= 2; b = 1;

In[4]:=
ParametricPlot[{x[t],y[t]},{t,0,2Pi}, AspectRatio-> Automatic];

AspectRatio-> Automatic is needed to get the same scales in x and y
directions.


Instead of functions you can use formulas:

In[5]:=
Clear[x,y]

In[6]:=
{x,y} = {a Cos[t],b  Sin[t]};

In[7]:=
ParametricPlot[{x,y},{t,0,2Pi},
 AspectRatio-> Automatic];


--
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642





  • Prev by Date: Re: tensor/matrix calculations
  • Next by Date: Re: ListPlot
  • Prev by thread: Re: How to draw an ellipse?
  • Next by thread: RE: How to draw an ellipse?