<controlVectors>
<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)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
avoidScientificNotationWhether to render numbers in full decimal form rather than scientific notation.
keyword. Direction in which the control vectors apply at the vertex.
| Value | Description |
|---|---|
symmetric (default) | Mirror the control vector on both sides of the vertex. |
previous | Apply the control vector toward the previous segment only. |
next | Apply the control vector toward the next segment only. |
both | Apply independent control vectors to both adjacent segments. |
none | No control vector at this vertex. |
displayDecimalsNumber of decimal places to display when rendering this number.
displayDigitsNumber of significant digits to display when rendering this number.
displaySmallAsZeroThreshold below which numbers are displayed as zero.
maxNumbernumber. Default value: Infinity. Maximum number of vectors to retain in the list.
padZerosWhether 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.
unorderedboolean. 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)
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.
fixedDefault 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.
isResponseWhether 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 <controlVectors name="c">
Other (6)
$c.directiontext. Direction in which the control vectors apply at the vertex.
$c.maxNumbernumber. Maximum number of vectors to retain in the list.
$c.numValuesnumber. The number of vectors in the list.
$c.numVectorsnumber. The number of vectors in the list.
$c.pointNumbernumber. 1-based index of the vertex these control vectors attach to.
$c.unorderedboolean. Whether the order of items in this list should be treated as unordered (e.g. for matching).
Common to all components (3)
$c.doenetMLtext. The DoenetML source code that produced this component.
$c.hideboolean. Whether to hide this component from the rendered output.
$c.styleNumberinteger. 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.