<angle>

<angle> is a Graphical component which renders a geometric angle when nested inside a <graph> component.

Attributes and Properties

Attributes for <angle>
AttributeTypeValues
applyStyleToLabel = "…"boolean"true" "false"
betweenLines = "…"
chooseReflexAngle = "…"text"never" "allowed" "always"
degrees = "…"math
displayDecimals = "…"integer
displayDigits = "…"integer
displaySmallAsZero = "…"number
emphasizeRightAngle = "…"boolean"true" "false"
inDegrees = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
layer = "…"integer
padZeros = "…"boolean"true" "false"
radians = "…"math
radius = "…"math
through = "…"
Props for <angle name="a">
PropertyType
$a.anglemath
$a.applyStyleToLabelboolean
$a.chooseReflexAngletext
$a.degreesmath
$a.disabledboolean
$a.displayDecimalsinteger
$a.displayDigitsinteger
$a.displaySmallAsZeronumber
$a.emphasizeRightAngleboolean
$a.fixedboolean
$a.fixLocationboolean
$a.hiddenboolean
$a.inDegreesboolean
$a.labellabel
$a.labelIsNameboolean
$a.layerinteger
$a.padZerosboolean
$a.radiansmath
$a.radiusmath
$a.valuemath

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