ReferencecontrolVectors

<controlVectors>

Bezier control vectors at points defining a curve (used inside `<bezierControls>`)

<controlVectors> is a Graphical component that is used to specify the direction(s) of the bezier curve handles at each through point within a <curve> component.

Attributes and Properties

Attributes for <controlVectors>

Other (10)
asList

boolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).

avoidScientificNotation

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

keyword. Direction in which the control vectors apply at the vertex.

ValueDescription
symmetric (default)Mirror the control vector on both sides of the vertex.
previousApply the control vector toward the previous segment only.
nextApply the control vector toward the next segment only.
bothApply independent control vectors to both adjacent segments.
noneNo control vector at this vertex.
displayDecimals

Number of decimal places to display when rendering this number.

displayDigits

Number of significant digits to display when rendering this number.

displaySmallAsZero

Threshold below which numbers are displayed as zero.

maxNumber

number. Default value: Infinity. Maximum number of vectors to retain in the list.

padZeros

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

number. 1-based index of the vertex these control vectors attach to.

unordered

boolean. Default value: false. Whether the order of vectors in this list should be treated as unordered (e.g. for matching).

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

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

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 <controlVectors name="c">

Other (6)

text. Direction in which the control vectors apply at the vertex.

$c.maxNumber

number. Maximum number of vectors to retain in the list.

$c.numValues

number. The number of vectors in the list.

$c.numVectors

number. The number of vectors in the list.

$c.pointNumber

number. 1-based index of the vertex these control vectors attach to.

$c.unordered

boolean. Whether the order of items in this list should be treated as unordered (e.g. for matching).

Common to all components (3)
$c.doenetML

text. The DoenetML source code that produced this component.

$c.hide

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

$c.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <controlVectors> with vectors specified directly

At each through point in the rendered <curve>, the directions for the bezier curve handles are specified directly within the opening and closing tags. Handles are symmetric by default, and only one <controlVector> is needed in this case to specify the orientation of the curve at each point.


Example: <controlVectors> with <vector> children

At each through point in the rendered <curve>, the directions for the bezier curve handles are specified by <vector> children of the <controlVectors> component. Handles are symmetric by default, and only one <controlVector> is needed in this case to specify the orientation of the curve at each point.

Attribute Examples

Attribute Example: direction

The direction attribute can be used to specify the unique behavior of the bezier handles associated with a given point.

symmetric: This is the default specification. Only one direction vector is used, and it will be used to set the direction toward the previous control point. The forward direction of the curve will be symmetric about the point. The handle’s symmetry allows for the user to adjust the curve while forcing it to pass smoothly through the point.

previous: Only one direction vector is used; it will supply the curve’s orientation toward the previous point. (If more than one vector is specified, the second one is ignored.) Since only a single bezier handle is available to the user, this allows for one-sided control of the curve at the point.

both: Two direction vectors are used; the first vector will supply the curve’s orientation toward the previous point. The second vector will provide the orientation towards the next point. Since two bezier handles are available to the user, this allows for two-sided independent control of the curve at the point.

next: Only one direction vector is used; it will supply the curve’s orientation toward the next point. (If more than one vector is specified, the second one is ignored.) Since only a single bezier handle is available to the user, this allows for one-sided control of the curve at the point.

none: A curve is automatically computed through the point. If any direction vectors are provided, they are ignored. The user cannot adjust the curve at this point.


Attribute Example: pointNumber

The pointNumber attribute specifies which through point the <controlVector> is associated with.

Property Examples

Property Example: direction

The direction of a <controlVectors> component can also be accessed as a property.