<ray>
<ray>
is a Graphical
component that renders a geometrical ray (one endpoint; the opposite side continuous), when
nested inside a <graph>
.
A <ray>
may be specified with:
- the
endpoint
and thethrough
attributes - the
endpoint
and thedirection
attributes
Attributes and Properties
Attribute | Type | Values |
---|---|---|
applyStyleToLabel = "…" | boolean | "true" "false" |
direction = "…" | [ math ] | |
displayDecimals = "…" | integer | |
displayDigits = "…" | integer | |
displaySmallAsZero = "…" | number | |
draggable = "…" | boolean | "true" "false" |
endpoint = "…" | [ math ] | |
labelIsName = "…" | boolean | "true" "false" |
layer = "…" | integer | |
padZeros = "…" | boolean | "true" "false" |
through = "…" | [ math ] |
Property | Type |
---|---|
$r.applyStyleToLabel | boolean |
$r.direction | [ math ] |
$r.disabled | boolean |
$r.displayDecimals | integer |
$r.displayDigits | integer |
$r.displaySmallAsZero | number |
$r.draggable | boolean |
$r.endpoint | [ math ] |
$r.fixed | boolean |
$r.fixLocation | boolean |
$r.hidden | boolean |
$r.label | label |
$r.labelIsName | boolean |
$r.layer | integer |
$r.numDimensions | number |
$r.padZeros | boolean |
$r.styleDescription | text |
$r.styleDescriptionWithNoun | text |
$r.through | [ math ] |
Example: <ray>
defined directly
The <ray>
component is defined directly by specifying coordinates within
the endpoint
and through
attributes. (Alternatively, a tuple may be directly
specified in the direction
attribute).
The user can manipulate the position of the ray
by dragging the ray itself, but
the direction remains constant.
Example: <ray>
defined with rendered through-point
The <ray>
component is used with the endpoint
and through
attributes. Note that, if no endpoint
is specified, the default is .
The user can manipulate both the direction and the endpoint of the <ray>
by dragging the points.
Example: <ray>
defined with endpoint and direction
If both the through
and direction
attributes are specified and not consistent, Doenet prioritizes the direction
.
Example: Adjust direction of a <ray>
If the direction
attribute references another component, such as a <vector>
or a <mathInput/>
, the user can manipulate the direction of the line segment.