drawArrow()function draws an arrow and is commonly used to illustrate vectors for many different kinds of vector quantities such as velocity, force etc. The function
drawArrow()should be called in the Calculations editor because it only draws the arrow for the current frame. If you call
drawArrow()in the Initial State editor, you will not see anything.
drawArrow(pos, size, color, components)
pos— coordinates for the starting point of the arrow as an [X,Y] matrix.
size— the vector to illustrate, e.g. [10, 0] will draw an arrow 10 units to the right.
color— Optional color value for your arrow, e.g. "red" or an HTML value like "#ff0000".
components— Optional flag that determines if vector components are drawn, a value of
truedisplays the components.