plottools - Maple Help

Home : Support : Online Help : Graphics : Packages : Plot Tools : plottools/ellipse

plottools

 ellipse
 generate 2-D plot object for an ellipse

 Calling Sequence ellipse(c, a, b, filled=boolean, numpoints=n, options)

Parameters

 c - center of the ellipse a - horizontal radius of the ellipse b - vertical radius of the ellipse filled=boolean - (optional) whether to fill the inside of the ellipse, default=false numpoints=n - (optional) number of points to generate, default=50 options - (optional) equations of the form option=value. For a complete list, see plot/options.

Description

 • The ellipse command creates a two-dimensional plot data object, which when displayed is an ellipse centered at c with radial distances a and b, that is, ellipse([x0, y0], a, b) graphs the ellipse

$\frac{{\left(x-\mathrm{x0}\right)}^{2}}{{a}^{2}}+\frac{{\left(y-\mathrm{y0}\right)}^{2}}{{b}^{2}}=1$

 • The plot data object produced by the ellipse command can be used in a PLOT data structure, or displayed using the plots[display] command.
 • Remaining arguments are interpreted as options, which are specified as equations of the form option = value. For more information, see plottools and plot/options.

Examples

 > $\mathrm{with}\left(\mathrm{plottools}\right):$
 > $\mathrm{with}\left(\mathrm{plots}\right):$

Draw an ellipse described by the following equation,

 > $a≔2:$$b≔3:$$\mathrm{x0}≔0:$$\mathrm{y0}≔0:$
 > $\mathrm{elli}≔\mathrm{ellipse}\left(\left[\mathrm{x0},\mathrm{y0}\right],a,b,\mathrm{filled}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right):$
 > $\mathrm{display}\left(\mathrm{elli},\mathrm{scaling}=\mathrm{constrained}\right)$

which is equivalent (apart from the filled option) to:

 > $\mathrm{eq}≔\frac{{\left(x-\mathrm{x0}\right)}^{2}}{{a}^{2}}+\frac{{\left(y-\mathrm{y0}\right)}^{2}}{{b}^{2}}=1:$
 > $\mathrm{implicitplot}\left(\mathrm{eq},x=-4..4,y=-4..4,\mathrm{scaling}=\mathrm{constrained}\right)$

Ellipse in arbitrary forms can be generated with object transformations like rotate in the plots package.

 > $\mathrm{display}\left(\mathrm{rotate}\left(\mathrm{elli},\frac{\mathrm{π}}{4}\right)\right)$