"dir" - mkraska/meclib GitHub Wiki

[ "dir", "name", [x,y], angle, offset, length]

small arrow with label (indication of coordinate axes).

  • "name" label, typeset in MathJax math mode
  • [x,y] start point
  • angle arrow direction, counter-clockwise from x-axis, in °.
  • offset (optional, defaults to 10 pixels) distance from arrow to text anchor point in pixels. If offset < 0, then the label is placed at the tail of the arrow, otherwise at the head.
  • length (optional, defaults to equivalent of 24 pixels), in standard grid units

image

[
  [ "grid", "","", -5,5,-4,5, 50, [1,1], [0,0] ],
  [ "point", "P", [2,1] ],
  [ "angle1", "\\alpha", [2, 1], [3,1], 0.7, 45 ],
  [ "dir", "a", [2,1], 45, 10, 1],
  [ "dim", "\\ell", [2,1], [2.707,1.707], 0.5],
  [ "dir", "v", [-2,1], 45, -10, 1],
  [ "dir", "a_n", [-0.8,1], 45, 10, 1],
  [ "label", "offset &lt; 0", [-2,2.2]],
  [ "label", "offset &gt; 0", [-0.5,2.2]]
]