algcurves - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Algebra : Polynomials : Algebraic Curves : algcurves/plot_real_curve

algcurves

 plot_real_curve
 plot the real variety of an algebraic curve

 Calling Sequence plot_real_curve(p, x, y, opt)

Parameters

 p - polynomial x, y - variables opt - (optional) equation(s) of the form option=value; specify options for the plot command or the plot_real_curve command

Description

 • The plot_real_curve command returns a plot of the algebraic curve specified by p, along with points where the tangent is horizontal and vertical, points where it starts integration, and singularities. This function calls solve to identify these points and dsolve/numeric with the rkf45 option to plot the curve.  This function is often better than plots[implicitplot].
 • Since this command uses solve with numerical polynomials in a preprocessing step, it may fail if the input polynomial p is not square-free.  You can improve many plots, for example, ${\left(x-y\right)}^{2}\left(x+y\right)$, by removing common factors of p and its derivative with respect to x or y. To do this, set $q≔\mathrm{normal}\left(\frac{p}{\mathrm{gcd}\left(p,\frac{\partial }{\partial x}p\right)}\right)$ and then call plot_real_curve(q,x,y) instead of plot_real_curve(p,x,y).
 • The abserr and relerr options for the numerical solution of initial value problems can be used. See dsolve/numeric/ivp.
 • The procedure plots tangent points and singularities in blue and points where it starts integration in green.
 • Most options valid for the plot command are understood by this command. For more information, see plot,options. If the view option is used, this cuts down on the computation of the points to plot.  Legends are not available for this command.
 • Additionally, the following options are also understood:
 arrowIntervalStep = posint
 Specify the number of points to skip before showing another pair of arrows. The default value is 20.
 arrowScaleFactor = positive
 Tangent vectors have length 1 in problem units, and normal vectors reflect the size of the curvature.  Sometimes this produces undesirable results because the arrows are too big or too small.  One can make all arrows larger or smaller by setting arrowScaleFactor to a number larger or smaller than 1, respectively.  The default is 1.
 colorOfCurve = c
 Color of curve trace. The default value is blue.
 colorOfNormalVector = c
 Color of the arrows normal to the direction of the curve. The default value is red.
 colorOfTangentVector = c
 Color of the tangent arrows. The default value is green.
 eventTolerance = positive
 Tracing stops near, at a distance less than eventTolerance, a singular point.  The default value is 0.01. Color of curve trace.
 showArrows = true or false
 Specify whether arrows in the tangent and normal direction are shown every arrowIntervalStep points along the curve. The default value is false.
 • Note: For uncomplicated curves, often few points are needed to accurately plot the curve, so with the default setting of arrowIntervalStep few (or no) arrows will be displayed. Simply reducing this value will display the arrows, as shown in the examples.

Examples

Elliptic curve:

 > $\mathrm{with}\left(\mathrm{algcurves}\right):$
 > $f≔{y}^{2}-x\left({x}^{2}-1\right):$
 > $\mathrm{plot_real_curve}\left(f,x,y,\mathrm{showArrows}=\mathrm{true}\right)$

Note that few arrows show up for this plot. To obtain a greater number of arrows, decrease the arrowIntervalStep value.  This is the command to create the plot from the Plotting Guide:

 > $\mathrm{plot_real_curve}\left(f,x,y,\mathrm{showArrows}=\mathrm{true},\mathrm{arrowIntervalStep}=10,\mathrm{arrowScaleFactor}=0.2\right)$

Petalled roses (3- petalled rose, [0,0] is an ordinary triple point):

 > $f≔{\left({x}^{2}+{y}^{2}\right)}^{2}+3{x}^{2}y-{y}^{3}$
 ${f}{≔}{\left({{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{2}}{+}{3}{}{{x}}^{{2}}{}{y}{-}{{y}}^{{3}}$ (1)
 > $\mathrm{plot_real_curve}\left(f,x,y,\mathrm{colorOfCurve}=\mathrm{red}\right)$

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam