ellipse - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

plottools

 ellipse
 generate 2-D plot object for an ellipse

 Calling Sequence ellipse(c, a, b, opts)

Parameters

 c - center of the ellipse a - horizontal radius of the ellipse b - vertical radius of the ellipse opts - (optional) equations of the form option=value

Options

 • Any applicable 2-D plot option in plot/options can also be given.
 • filled : truefalse
 Specifies whether to fill the inside of the ellipse. The default is false.
 • rotate = real
 Specifies that ellipse should be be rotated by the specified angle (in radians). The default is 0.
 • super = positive real, list of two positive reals, or the value true
 The super option given alone is equivalent to super=m (with m=4) which is equivalent to super=[m,m]. More generally ellipse([x0, y0], a, b, super=[m1,m2]) draws the superellipse (or generalized superellipse when $\mathrm{m1}\ne \mathrm{m2}$)

${\left|\frac{x-\mathrm{x0}}{a}\right|}^{\mathrm{m1}}+{\left|\frac{y-\mathrm{y0}}{b}\right|}^{\mathrm{m2}}=1$

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) draws the ellipse

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

 • The super option may be used to draw a superellipse or generalized superellipse.
 • 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 such as rotate in the plots package.

 > $\mathrm{display}\left(\mathrm{rotate}\left(\mathrm{elli},\frac{\mathrm{\pi }}{4}\right)\right)$
 > $\mathrm{display}\left(\mathrm{ellipse}\left(\mathrm{super}\right),\mathrm{scaling}=\mathrm{constrained}\right)$
 > $\mathrm{ms}≔\left[\frac{1}{3},\frac{1}{2},\frac{2}{3},1,\frac{3}{2},2,3,5\right]$
 ${\mathrm{ms}}{≔}\left[\frac{{1}}{{3}}{,}\frac{{1}}{{2}}{,}\frac{{2}}{{3}}{,}{1}{,}\frac{{3}}{{2}}{,}{2}{,}{3}{,}{5}\right]$ (1)
 > $\mathrm{display}\left(\mathrm{seq}\left(\mathrm{ellipse}\left(\mathrm{super}=\mathrm{ms}\left[i\right],\mathrm{legend}=\mathrm{cat}\left("m=",\mathrm{ms}\left[i\right]\right),\mathrm{color}="Niagara"‖i\right),i=1..\mathrm{nops}\left(\mathrm{ms}\right)\right),\mathrm{scaling}=\mathrm{constrained}\right)$
 > $\mathrm{display}\left(\mathrm{ellipse}\left(\mathrm{super}=\left[\frac{1}{5},3\right],\mathrm{color}="DarkRed"\right),\mathrm{ellipse}\left(\mathrm{super}=\left[2,5\right],\mathrm{color}="DarkBlue"\right),\mathrm{scaling}=\mathrm{constrained}\right)$

Compatibility

 • The super option was introduced in Maple 2019.
 • For more information on Maple 2019 changes, see Updates in Maple 2019.
 • The plottools[ellipse] command was updated in Maple 2023.
 • The rotate option was introduced in Maple 2023.
 • For more information on Maple 2023 changes, see Updates in Maple 2023.

 See Also