<circle>
<circle> is a Graphical
component that renders inside a <graph>.
Attributes and Properties
Attributes for <circle>
Number display (5)
avoidScientificNotationboolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.
displayDecimalsinteger. Default value: 2. Number of decimal places to display when rendering this number.
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
displaySmallAsZeronumber. Default value: 1e-14. Threshold below which numbers are displayed as zero.
padZerosboolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Labels (1)
labelIsNameboolean. Default value: false. Whether to use this component's name as its rendered label.
Other (23)
addControlskeyword. Whether to render interactive control handles on the circle.
| Value | Description |
|---|---|
center | Show a control handle for moving the circle's center. |
radius | Show a control handle for resizing the circle's radius. |
centerAndRadius (default) | Show control handles for both moving the center and resizing the radius. |
none | Show no control handles. |
applyStyleToLabelboolean. Default value: false. Whether to apply this component's selected style to its label.
[ point ]. The circle's center point.
controlOrderinteger. Default value: 0. Slot order for graph controls (1-indexed; 0 means no explicit slot request).
draggableboolean. Default value: true. Whether the curve can be dragged on a graph.
extrapolateBackwardboolean. Default value: false. Whether to extrapolate the curve before its first defined point.
extrapolateForwardboolean. Default value: false. Whether to extrapolate the curve beyond its last defined point.
boolean. Default value: false. Whether to fill the interior of the circle.
fillOpacitynumber. Opacity of fills, 0 to 1.
flipFunctionboolean. Default value: false. Whether to swap the function and its argument (i.e., reflect across y=x).
hideOffGraphIndicatorboolean. Whether to suppress the indicator drawn at the edge when the component is off-screen.
labelPositionkeyword. Position of the curve's label relative to the curve.
| Value | Description |
|---|---|
upperRight (default) | Place the label above and to the right of the curve. |
upperLeft | Place the label above and to the left of the curve. |
lowerRight | Place the label below and to the right of the curve. |
lowerLeft | Place the label below and to the left of the curve. |
top | Place the label directly above the curve. |
bottom | Place the label directly below the curve. |
left | Place the label directly to the left of the curve. |
right | Place the label directly to the right of the curve. |
layerinteger. Default value: 0. Z-order layer index used to stack graphical components (higher values render on top).
lineStylekeyword. Stroke style for lines.
| Value | Description |
|---|---|
solid | Continuous, unbroken stroke. |
dashed | Stroke composed of evenly-spaced dashes. |
dotted | Stroke composed of evenly-spaced dots. |
lineWidthnumber. Stroke width for lines, in pixels.
nearestPointAsCurveboolean. Default value: false. Whether nearest-point queries should treat this as a curve in the plane rather than a graph y = f(x).
numDiscretizationPointsnumber. Default value: 1000. Number of points used when discretizing the curve for rendering.
periodicboolean. Default value: false. Whether the curve is treated as periodic when interpolating between control points.
math. The circle's radius.
showCoordsWhenDraggingboolean. Default value: true. Whether to show coordinate labels while dragging the curve.
splineFormkeyword. Form of spline used to interpolate between control points.
| Value | Description |
|---|---|
centripetal (default) | Centripetal Catmull-Rom spline (avoids self-intersection at sharp turns). |
uniform | Uniform Catmull-Rom spline with evenly spaced parameterization. |
splineTensionnumber. Default value: 0.8. Tension parameter used when fitting a spline through control points.
pointList. Points the circle passes through.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <circle name="c">
Number display (5)
$c.avoidScientificNotationboolean. Whether to render numbers in full decimal form rather than scientific notation.
$c.displayDecimalsinteger. Number of decimal places to display when rendering this number.
$c.displayDigitsinteger. Number of significant digits to display when rendering this number.
$c.displaySmallAsZeronumber. Threshold below which numbers are displayed as zero.
$c.padZerosboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Labels (2)
$c.labellabel. The label rendered with this component.
$c.labelIsNameboolean. Whether to use this component's name as its rendered label.
Other (32)
$c.addControlstext. Whether to render interactive control handles on the circle.
$c.applyStyleToLabelboolean. Whether to apply this component's selected style to its label.
$c.areamath. The area enclosed by the circle.
$c.borderStyleDescriptiontext. A textual description of the circle's border style.
$c.center[ math ]. The center coordinates of the circle.
$c.circumferencemath. The circumference of the circle.
$c.controlOrderinteger. Slot order for graph controls (1-indexed; 0 means no explicit slot request).
$c.diametermath. The diameter of the circle.
$c.disabledboolean. Whether this component is disabled and cannot be interacted with.
$c.draggableboolean. Whether the curve can be dragged on a graph.
$c.extrapolateBackwardboolean. Whether to extrapolate the curve before its first defined point.
$c.extrapolateForwardboolean. Whether to extrapolate the curve beyond its last defined point.
$c.filledboolean. Whether to fill the interior of the circle.
$c.fillStyleDescriptiontext. A textual description of the circle's fill style.
$c.fixedboolean. Whether this component's value is fixed and cannot be modified.
$c.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$c.flipFunctionboolean. Whether to swap the function and its argument (i.e., reflect across y=x).
$c.hideOffGraphIndicatorboolean. Whether to suppress the off-graph indicator when the circle is outside the visible area.
$c.labelPositiontext. Position of the curve's label relative to the curve.
$c.layerinteger. Z-order layer index used to stack graphical components (higher values render on top).
$c.numDiscretizationPointsnumber. Number of points used when discretizing the curve for rendering.
$c.parMaxnumber. Maximum value of the curve parameter (always 2π for a circle).
$c.parMinnumber. Minimum value of the curve parameter (always 0 for a circle).
$c.periodicboolean. Whether the curve is treated as periodic when interpolating between control points.
$c.radiusmath. The radius of the circle.
$c.showCoordsWhenDraggingboolean. Whether to show coordinate labels while dragging the curve.
$c.splineFormtext. Form of spline used to interpolate between control points.
$c.splineTensionnumber. Tension parameter used when fitting a spline through control points.
$c.styleDescriptiontext. A textual description of the circle's style.
$c.styleDescriptionWithNountext. Style description including the word "circle".
$c.throughPoints[ math ]. Points the circle is constrained to pass through.
Common to all components (4)
$c.doenetMLtext. The DoenetML source code that produced this component.
$c.hideboolean. Whether to hide this component from the rendered output.
$c.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$c.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Default <circle>
This is a default <circle> without any additional attributes specified.
It has a default radius of and center at .
Example: <circle> with center and radius
The center and radius of the circle are specified as attributes.
Example: <circle> through 3 points
Three points the circle passes through are specified using the through attribute.
Attribute Examples
Attribute Example: through
The through attribute can be used to specify one to three through-points
and can be used in combination with other attributes.
Attribute Example: center
The center attribute references a constrained point, thereby
restricting the movement of the <circle> to a grid.
Attribute Example: radius
A <circle> is defined with default center at the origin
and a radius specified with a user-input.
Attribute Example: filled
Use the filled attribute to fill in a <circle> with the
color corresponding to its styleNumber.
Attribute Example: Standard graphical attributes
The uses of the following standard graphical attributes are illustrated:
hide, draggable, layer, styleNumber, applyStyleToLabel and labelIsName.
Layers: By adjusting the layer attribute number, geometry can be placed
in front of or behind other geometry. The default layer number is 0; all
higher numbers are placed in front.
Attribute Example: throughPoints
The throughPoints property renders the values of the points specified
in the through attribute stored in an array. These can be rendered on a
<graph> or as a math. Enclose the reference in an <asList>
component for clarity when rendering as a math.
Individual through-points or coordinates of individual through-points can be accessed using array notation.
Property Examples
Property Example: Style properties
The styleDescription, styleDescriptionWithNoun, fillStyleDescription,
and borderStyleDescription properties render a text description
corresponding to the styleNumber of the component.