<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>
Highlighted (1)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
Number display (5)
avoidScientificNotationAdded in 0.7.16boolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.
displayDecimalsinteger. Default value: 2. Number of decimal places to display when rendering this number.
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
displaySmallAsZeronumber. Default value: 1e-14. Threshold below which numbers are displayed as zero.
padZerosboolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Other (4)
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. |
maxNumbernumber. Default value: Infinity. Maximum number of items to retain in the list.
number. 1-based index of the vertex these control vectors attach to.
unorderedboolean. Default value: false. Whether the order of items 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.
fixedboolean. Default 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.
isResponseboolean. Default value: false. Whether 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">
Number display (5)
$c.avoidScientificNotationIn developmentboolean. Whether to render numbers in full decimal form rather than scientific notation.
$c.displayDecimalsIn developmentinteger. Number of decimal places to display when rendering this number.
$c.displayDigitsIn developmentinteger. Number of significant digits to display when rendering this number.
$c.displaySmallAsZeroIn developmentnumber. Threshold below which numbers are displayed as zero.
$c.padZerosIn developmentboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Other (8)
$c.directiontext. Direction in which the control vectors apply at the vertex.
$c.maxNumbernumber. Maximum number of items to retain in the list.
$c.numComponentsIn developmentnumber. The number of items in the list.
$c.numDimensionsIn developmentinteger. The number of dimensions of the items, the largest among them.
$c.numValuesnumber. The number of values 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 (7)
$c.disabledIn developmentboolean. Whether this component is disabled and cannot be interacted with.
$c.doenetMLtext. The DoenetML source code that produced this component.
$c.fixedIn developmentboolean. Whether this component's value is fixed and cannot be modified.
$c.fixLocationIn developmentboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$c.hideboolean. Whether to hide this component from the rendered output.
$c.isResponseIn developmentboolean. Whether this component is treated as a response for the purposes of assessment.
$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.