Re: How to draw an ellipse?
- To: mathgroup@smc.vnet.net
- Subject: [mg10384] Re: [mg10343] How to draw an ellipse?
- From: seanross@worldnet.att.net
- Date: Mon, 12 Jan 1998 04:10:14 -0500
- References: <199801090441.XAA18916@smc.vnet.net.>
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. -- > Sincerely > Krishnan Jayakrishnan > Systems Administrator > Allied Geophysical Labs > University of Houston Several ways: First, if you just want to display one, then use Show[Graphics[Circle[{0,0},{a,b}]]]. Of course, you will have to specify actual numbers for a and b. Mathematica does not plot in units of unspecified symbols. The other way is to use ParametricPlot as in: ParametricPlot[{2 Sin[t],Cos[t]},{t,0,2 Pi},AspectRatio->Automatic]. You can even use a rectangular plot for the same thing, but you will have to do two of them: one for positive and negative as in: Show[Plot[Sqrt[1-x^2],{x,-1,1}],Plot[-Sqrt[1-x^2],{x,-1,1}]] Based on the way you wrote your equations, you might want to review section 1.2.5 in the mathematica book on the various kinds of bracketing. -- Remove the _nospam_ in the return address to respond.
- References:
- How to draw an ellipse?
- From: saljxk@dix.agl.uh.edu (Krishnan Jayakrishnan)
- How to draw an ellipse?