<curve>

<curve> is a Graphical component that renders a spline within a <graph>.

Attributes and Properties

Attributes for <curve>
AttributeTypeValues
applyStyleToLabel = "…"boolean"true" "false"
displayDecimals = "…"integer
displayDigits = "…"integer
displaySmallAsZero = "…"number
draggable = "…"boolean"true" "false"
extrapolateBackward = "…"boolean"true" "false"
extrapolateForward = "…"boolean"true" "false"
flipFunction = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
labelPosition = "…"text"upperright" "upperleft" "lowerright" "lowerleft" "top" "bottom" "left" "right"
layer = "…"integer
nearestPointAsCurve = "…""true" "false"
numDiscretizationPoints = "…"number
padZeros = "…"boolean"true" "false"
parMax = "…"number
parMin = "…"number
periodic = "…"boolean"true" "false"
showCoordsWhenDragging = "…"boolean"true" "false"
splineForm = "…"text"centripetal" "uniform"
splineTension = "…"number
through = "…"
variable = "…"
Props for <curve name="c">
PropertyType
$c.applyStyleToLabelboolean
$c.controlPoints[ math ]
$c.controlVectors[ math ]
$c.curvatureChangePoints[ number ]
$c.disabledboolean
$c.displayDecimalsinteger
$c.displayDigitsinteger
$c.displaySmallAsZeronumber
$c.draggableboolean
$c.extrapolateBackwardboolean
$c.extrapolateBackwardModetext
$c.extrapolateForwardboolean
$c.extrapolateForwardModetext
$c.ffunction
$c.fixedboolean
$c.fixLocationboolean
$c.flipFunctionboolean
$c.fs[ function ]
$c.hiddenboolean
$c.hiddenControls[ boolean ]
$c.labellabel
$c.labelIsNameboolean
$c.labelPositiontext
$c.layerinteger
$c.numCurvatureChangePointsinteger
$c.numDimensionsnumber
$c.numDiscretizationPointsnumber
$c.numXCriticalPointsinteger
$c.numYCriticalPointsinteger
$c.padZerosboolean
$c.parMaxnumber
$c.parMinnumber
$c.periodicboolean
$c.showCoordsWhenDraggingboolean
$c.splineFormtext
$c.splineTensionnumber
$c.styleDescriptiontext
$c.styleDescriptionWithNountext
$c.throughPoints[ math ]
$c.vectorControlDirections[ text ]
$c.xCriticalPoints[ number ]
$c.yCriticalPoints[ number ]

Example: <curve> through 4 points

A <curve> is constructed through four points specified in the through attribute.


Example: <curve> through 4 points with bezier controls

A <curve> is constructed through four points specified in the through attribute. The shape of the curve at its through points is specified with <bezierControls>. When <bezierControls> are specified, draggable handles appear on the <graph> when the through points are clicked.


Example: Parametric equation of an ellipse

Parametric equations can be constructed with the <curve> component by assigning a parameter with the variable attribute and providing function children for the xx-coordinates and yy-coordinates defining the <curve>.