plot the real variety of an algebraic curve
plot_real_curve(p, x, y, opt)
(optional) equation(s) of the form option=value; specify options for the plot command or the plot_real_curve command
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, x−y2⁢x+y, by removing common factors of p and its derivative with respect to x or y. To do this, set q≔normal⁡pgcd⁡p,∂∂xp 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.
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:
Petalled roses (3- petalled rose, [0,0] is an ordinary triple point):
Download Help Document
What kind of issue would you like to report? (Optional)