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 1999

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

Search the Archive

Re: drawing tilted ellipses?

  • To: mathgroup at
  • Subject: [mg20493] Re: drawing tilted ellipses?
  • From: adam.smith at
  • Date: Wed, 27 Oct 1999 02:04:55 -0400
  • References: <7v3bmr$>
  • Sender: owner-wri-mathgroup at

This is easily possible.  First parameterize your ellipse.  Then use a
rotation matrix to transform the {x,y} coordinates into a tilted set.

Below is my code (Maybe not the most elegant, but it works).  I
used "Evaluate" inside the plot to avoid an annoying but harmless
warning message.  Also, be sure to set AspectRatio->Automatic or
Mathematica will scale the height/width in such a way that your ellipse
won't have the proper "look".

ellipse = {3 *Cos[2*Pi*t],2*Sin[2*Pi*t]};
ParametricPlot[ Evaluate[ellipse],{t,0,1},AspectRatio->Automatic];
theta = 30*Pi/180;
rotmatrix = {{Cos[theta],-Sin[theta]},{Sin[theta],Cos[theta]}};
tiltedellipse = rotmatrix.ellipse
ParametricPlot[ Evaluate[tiltedellipse],{t,0,1},AspectRatio->Automatic];

Adam Smith

In article <7v3bmr$5te at>,
  Joe Strout <joe at> wrote:
> Is it possible to draw an ellipse in Mathematica that is not
> to the XY axes?  E.g., leaning over 30 degrees?
> I thought perhaps I could specify it orthogonally and then apply a
> rotation transformation, but the only transformations available seem
> be scaling (Scaled) and translation (Offset).
> Of course I could use a series of line segments, but I want this to be
> smooth even when printed on a high-resolution printer.  Any tips?
> Thanks,
> -- Joe
> --
> ,------------------------------------------------------------------.
> |    Joseph J. Strout           Biocomputing -- The Salk Institute |
> |    joe at                 |
> `------------------------------------------------------------------'
> Check out the Mac Web Directory!

Sent via
Before you buy.

  • Prev by Date: Re: Preventing NotebookWrite From Wrapping
  • Next by Date: Re: ScientificForm with NotebookWrite
  • Previous by thread: Re: drawing tilted ellipses?
  • Next by thread: Re: drawing tilted ellipses?