Referencevector

<vector>

<vector> is a Graphical component that renders a vector when nested within a <graph>. Outside a graph, it can be used in vector computations.

Attributes and Properties

Attributes for <vector>
AttributeTypeValues
applyStyleToLabel = "…"boolean"true" "false"
displacement = "…"[ math ]
displayDecimals = "…"integer
displayDigits = "…"integer
displaySmallAsZero = "…"number
displayWithAngleBrackets = "…"boolean"true" "false"
draggable = "…"boolean"true" "false"
head = "…"[ math ]
headDraggable = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
layer = "…"integer
padZeros = "…"boolean"true" "false"
showCoordsWhenDragging = "…"boolean"true" "false"
tail = "…"[ math ]
tailDraggable = "…"boolean"true" "false"
x = "…"math
xs = "…"
y = "…"math
z = "…"math
Props for <vector name="v">
PropertyType
$v.applyStyleToLabelboolean
$v.backgroundColortext
$v.disabledboolean
$v.displacement[ math ]
$v.displayDecimalsinteger
$v.displayDigitsinteger
$v.displaySmallAsZeronumber
$v.displayWithAngleBracketsboolean
$v.draggableboolean
$v.fixedboolean
$v.fixLocationboolean
$v.head[ math ]
$v.headDraggableboolean
$v.hiddenboolean
$v.labellabel
$v.labelIsNameboolean
$v.latexlatex
$v.layerinteger
$v.magnitudemath
$v.numDimensionsnumber
$v.padZerosboolean
$v.showCoordsWhenDraggingboolean
$v.styleDescriptiontext
$v.styleDescriptionWithNountext
$v.tail[ math ]
$v.tailDraggableboolean
$v.textColortext
$v.textStyleDescriptiontext
$v.xmath
$v.ymath
$v.zmath

Example: Default <vector>

A default <vector> without any additional attributes has tail at the origin and head at (1,0)(1,0).


Example: <vector> math

A <vector> within a <math> follows vector operations.


Attribute Example: x,y

The x and y attributes allow the vector to be specified by its coordinates or row elements for a vector given by v=(x,y)\bf{v} = (x, y).


Attribute Example: xs

The xs attribute allows the vector to be specified by its displacements in list format. To access or render the list information, use index notation.


Attribute Example: displacement

Use the displacement property to specify the displacement of the vector in each direction from its tail position.


Attribute Example: head, tail

Use head and tail to specify the head and tail coordinates of the vector directly.


Attribute Example: displayWithAngleBrackets

If this is the desired rendering format, use the attribute displayWithAngleBrackets.


Attribute Example: draggable

The draggable attribute determines whether the <point> can be dragged around the <graph>. All graphical objects are draggable by default.


Attribute Example: headDraggable, tailDraggable

The head and tail of a <vector> are draggable by default. Use the headDraggable or tailDraggable attribute set to false to disable users from changing the direction and length of the <vector>. The vector as a whole can still be repositioned on the <graph>.


Attribute Example: Standard graphical attributes

The uses of the following standard graphical attributes are illustrated: hide, fixLocation, layer, styleNumber, applyStyleToLabel and labelIsName.


Property Example: numDimensions

The numDimensions property returns the number of dimesions of the <vector>.


Property Example: magnitude

The magnitude property renders the magnitude of the named <vector>.


Property Example: latex

The latex property renders the latex code for rendering the named <vector>.