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

# Online Help

###### All Products    Maple    MapleSim

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].
 • 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:
 makesquarefree = true or false
 If the input polynomial p is not square-free, then the main algorithm in this command may fail. For this reason, by default, Maple factors repeated factors out of p, by computing $q≔\mathrm{normal}\left(\frac{p}{\mathrm{gcd}\left(p,\frac{ⅆp}{ⅆx}\right)}\right)$ if p is a polynomial over the rational numbers, and using q instead of p if the two differ. To turn off this behavior, use the makesquarefree = false option.
 If the input polynomial does not have rational coefficients, this step is not taken (regardless of the setting of the makesquarefree option). If the coefficients are floating-point values, it may be useful to use the facilities of the PolynomialTools:-Approximate package to do a similar step manually.
 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)$

Compatibility

 • The algcurves[plot_real_curve] command was updated in Maple 2022.
 • The makesquarefree option was introduced in Maple 2022.
 • For more information on Maple 2022 changes, see Updates in Maple 2022.

 See Also