Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

RE: Drawing an ellipse

  • To: mathgroup at
  • Subject: [mg36724] RE: [mg36654] Drawing an ellipse
  • From: "Wolf, Hartmut" <Hartmut.Wolf at>
  • Date: Fri, 20 Sep 2002 04:16:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

>-----Original Message-----
>From: pimak [mailto:piotrowski.maciek at]
To: mathgroup at
>Sent: Wednesday, September 18, 2002 8:09 AM
>Subject: [mg36724] [mg36654] Drawing an ellipse
>I am new with Mathematica, I have one question,
>I know that the sollution might be very easy, but I wasn't able to
>find it by now.
>I would like to draw an ellipse, the formula let's say is as follows:
>0.09 x^2 +0.04 x y + 0.06 y^2 = 4

Two methods: (1) solve for explit functions y = f[x] and plot those:

In[2]:= eqn = 0.09 x^2 + 0.04 x y + 0.06 y^2 == 4

... just for convenience;

In[5]:= sols = Solve[eqn, y]
In[6]:= y /. sols

...these are the two functions for y expressed by x. To find the minimum and
maximum values for x, we spot the discriminant, and solve for x:

{xmin, xmax} = 
  x /. Solve[
      Cases[y /. sols[[1]], 
          Sqrt[disc_] :> disc, Infinity] == 0, x] we may use Plot:

Plot[Evaluate[y /. sols], {x, xmin, xmax}, AspectRatio -> Automatic]

(2) guess approximate values for xmin, xmax and let Mathematica do all that

In[1]:= << Graphics`ImplicitPlot`

...load the package

In[19]:= ImplicitPlot[eqn, {x, -7, 7}]



  • Prev by Date: Re: Inv.Interpol.Function
  • Next by Date: Re: build-in commutativity
  • Previous by thread: Drawing an ellipse
  • Next by thread: Resetting after SetOptions