<angle>
<angle> is a Graphical component
which renders a geometric angle when nested inside a <graph> component.
Attributes and Properties
Attributes for <angle>
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 (10)
applyStyleToLabelboolean. Default value: false. Whether to apply this component's selected style to its label.
_lineListComponent. Two lines whose intersection forms the angle.
keyword. How to handle reflex angles.
| Value | Description |
|---|---|
never (default) | Always normalize to the non-reflex angle (less than 180°). |
allowed | Use a reflex angle (greater than 180°) if it matches the input. |
always | Always render the angle as a reflex angle. |
math. The angle measure in degrees.
boolean. Default value: true. Whether to render right angles with the conventional square symbol.
boolean. Default value: false. Whether to interpret and display the angle in degrees rather than radians.
layerinteger. Default value: 0. Z-order layer index used to stack graphical components (higher values render on top).
math. The angle measure in radians.
math. Default value: . Radius of the rendered angle arc.
pointList. Three points (vertex in the middle) defining the angle.
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 <angle name="a">
Number display (5)
$a.avoidScientificNotationboolean. Whether to render numbers in full decimal form rather than scientific notation.
$a.displayDecimalsinteger. Number of decimal places to display when rendering this number.
$a.displayDigitsinteger. Number of significant digits to display when rendering this number.
$a.displaySmallAsZeronumber. Threshold below which numbers are displayed as zero.
$a.padZerosboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Labels (2)
$a.labellabel. The label rendered with this component.
$a.labelIsNameboolean. Whether to use this component's name as its rendered label.
Other (14)
$a.anglemath. The angle measure in radians.
$a.applyStyleToLabelboolean. Whether to apply this component's selected style to its label.
$a.chooseReflexAngletext. How to handle reflex angles.
$a.degreesmath. The angle measure in degrees.
$a.disabledboolean. Whether this component is disabled and cannot be interacted with.
$a.emphasizeRightAngleboolean. Whether to render right angles with the conventional square symbol.
$a.fixedboolean. Whether this component's value is fixed and cannot be modified.
$a.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$a.inDegreesboolean. Whether to interpret and display the angle in degrees rather than radians.
$a.layerinteger. Z-order layer index used to stack graphical components (higher values render on top).
$a.radiansmath. The angle measure in radians.
$a.radiusmath. Radius of the rendered angle arc.
$a.valuemath. The angle measure in radians.
Common to all components (4)
$a.doenetMLtext. The DoenetML source code that produced this component.
$a.hideboolean. Whether to hide this component from the rendered output.
$a.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$a.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Angle between two lines
Two lines are created within a <graph> using the <line> component.
The <angle> component is specified by referencing those lines by name with the betweenLines attribute.
Example: Angle between three points
Three points define the angle with the through attribute.
Example: Angle specified by user-input
The user is prompted to enter an angle with the <mathInput/> component.
This angle is then referenced by name within the opening and closing <angle> tags.
Attribute Examples
Attribute Example: radius
The radius attribute is used to change the radius of the angle symbol shown on the graph. Default = 1; type = math.
Attribute Example: chooseReflexAngle
The chooseReflexAngle attribute is used to change the behavior of angle representation, where more than one angle is possible. The attribute accepts three possible text values: always, never (default), and allowed.
The blue angle in the graph illustrates the condition where the default condition where the reflex angle (or angle greater than ) is never selected.
By contrast, the red angle illustrates the condition where the reflex angle is always selected.
Finally, the orange angle takes the specified through-points in a counter-clockwise
direction and illustrates the case where chooseReflexAngle = "allowed" has been selected. The
resulting angle may be a reflex angle or not a reflex angle depending on the position of the
points. Try dragging the red square (point C) to observe this difference in behavior. Default = “never”; type = text.
Attribute Example: inDegrees
The inDegrees attribute specifies that the output of the angle when defined or
copied outside the graph should have units of degrees. Default = “false”; type = boolean.
Attribute Example: degrees
The degrees attribute specifies the measure of the angle in degrees; type = math.
Attribute Example: radians
The radians attribute specifies the measure of the angle in radians; type = math. Note that
radians are the default units for angles in DoenetML.
Attribute Example: through
The through attribute accepts three points through which to construct the angle. Type = pointList.
Attribute Example: betweenLines
The betweenLines attribute accepts two lines to construct the angle between. Type = lineList.
Attribute Example: emphasizeRightAngle
By default, right angles are shown with a square symbol. Use the emphasizeRightAngle attribute set to false
to negate this default convention. Default = “true”, type = boolean.
Property Examples
Property Example: Attributes as properties
The above listed <angle> attributes are also accessible as properties.
Property Example: Angle, value
The angle and value properties returns the value of the angle in default radians.