<angle>

An angle defined by three points or a measure

<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)
avoidScientificNotation

boolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.

displayDecimals

integer. Default value: 2. Number of decimal places to display when rendering this number.

displayDigits

integer. Default value: 3. Number of significant digits to display when rendering this number.

displaySmallAsZero

number. Default value: 1e-14. Threshold below which numbers are displayed as zero.

padZeros

boolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Labels (1)
labelIsName

boolean. Default value: false. Whether to use this component's name as its rendered label.

Other (10)
applyStyleToLabel

boolean. 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.

ValueDescription
never (default)Always normalize to the non-reflex angle (less than 180°).
allowedUse a reflex angle (greater than 180°) if it matches the input.
alwaysAlways 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.

layer

integer. 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: \(1\). Radius of the rendered angle arc.

pointList. Three points (vertex in the middle) defining the angle.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. 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.avoidScientificNotation

boolean. Whether to render numbers in full decimal form rather than scientific notation.

$a.displayDecimals

integer. Number of decimal places to display when rendering this number.

$a.displayDigits

integer. Number of significant digits to display when rendering this number.

$a.displaySmallAsZero

number. Threshold below which numbers are displayed as zero.

$a.padZeros

boolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Labels (2)
$a.label

label. The label rendered with this component.

$a.labelIsName

boolean. Whether to use this component's name as its rendered label.

Other (14)

math. The angle measure in radians.

$a.applyStyleToLabel

boolean. Whether to apply this component's selected style to its label.

$a.chooseReflexAngle

text. How to handle reflex angles.

$a.degrees

math. The angle measure in degrees.

$a.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$a.emphasizeRightAngle

boolean. Whether to render right angles with the conventional square symbol.

$a.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$a.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$a.hidden

boolean. Whether this component is hidden from the rendered output.

$a.inDegrees

boolean. Whether to interpret and display the angle in degrees rather than radians.

$a.layer

integer. Z-order layer index used to stack graphical components (higher values render on top).

$a.radians

math. The angle measure in radians.

$a.radius

math. Radius of the rendered angle arc.

math. The angle measure in radians.

Common to all components (4)
$a.doenetML

text. The DoenetML source code that produced this component.

$a.hide

boolean. Whether to hide this component from the rendered output.

$a.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$a.styleNumber

integer. 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 180180^\circ) 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.