MathGroup Archive 2001

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

Search the Archive

RE: Filled Ellipsoid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27524] RE: [mg27505] Filled Ellipsoid
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 3 Mar 2001 03:40:04 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Boris,

Here is one method. We will need these packages:

Needs["Geometry`Rotations`"]
Needs["Graphics`Colors`"]

This is a parametric definition of an ellipse with a and b for axes lengths
and tilted at an angle theta. (You could also add translation terms to
center the ellipse at some other point.)

ellipse[theta_, a_, b_][t_] := RotationMatrix2D[-theta].{a Cos[t], b Sin[t]}

This converts the ellipse into a Line primitive. We plot, suppress the plot
display, and extract the primitive Line graphics which are the first part of
the Graphics output.

curve = First[ParametricPlot[Evaluate[
      ellipse[Pi/4, 7, 3][t]], {t, 0, 2*Pi},
     DisplayFunction -> Identity]];

This draws the ellipse as a filled area. We change Line to Polygon to obtain
a filled area colored Tomato. Then we change back to Black and draw the
curve to outline the area.

Show[Graphics[
      {Tomato, curve /. Line -> Polygon,
        Black, curve}], AspectRatio -> Automatic];

The DrawingPaperTutorial which goes with the DrawingPaper packages at my web
site has a section on drawing filled areas by various methods. DrawingPaper
makes it a little easier to extract the curve primitives from various plot
types and to manipulate the resulting data.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


> From: Boris Breznen [mailto:bbreznen at vis.caltech.edu]
To: mathgroup at smc.vnet.net
>
> Is there a siple way to plot filled ellipsoid in Mathematica ? The basic
> Ellipsoid function, included in
> the Statistics`MultiDescriptiveStatistics` package plots a
> contour. I would
> like to
> fill it (simmilar to what Disc does with respect to Circle).
>
> Thank you,
>
> Boris Breznen
> bbreznen at vis.caltech.edu
>




  • Prev by Date: Re: Large number of equations with large number of unknowns
  • Next by Date: Re: Troubles saving as *.m
  • Previous by thread: Re: Filled Ellipsoid
  • Next by thread: Re: Off[General::spell] doesn't disable spell-warning