arrow

_images/arrow.jpg _images/arrowaxis.png
arrow(pos=vec(0, 0, 0), axis=vec(1, 0, 0), color=color.orange)
Parameters:
  • pos (vector) – Position of tail. Default <0,0,0>.

  • axis (vector) – Extends from tail to tip. Default <1,0,0>.

  • color (vector) – Default is color.white

  • round (boolean) – Makes shaft and head round instead of square. Default is False.

  • shaftwidth (scalar) – Width of tail. Default 0.1*(length of arrow)

  • headwidth (scalar) – Default 2*shaftwidth

  • headlength (scalar) – Default 3*shaftwidth

If you don’t set shaftwidth, shorter arrows will be smaller in all dimensions than longer arrows (first image below). By setting shaftwidth you can ensure that all arrows will have the same cross sectional area (second image below).

_images/shaftwidth2a.png _images/shaftwidth2b.png

Note that, if you do set shaftwidth, the headlength of extremely short arrows may need to be adjusted.

Attributes used less often:

arrow(opacity=0.5, shininess=0.2, texture=textures.wood, make_trail=True, canvas=mycanvas, emissive=False)
Parameters:
  • opacity (scalar) – Default 1.0; Range 0-1.

  • shininess (scalar) – Default 0.6; Range 0-1.

  • emissive (boolean) – Default False. Object glows, losing all shading, if True.

  • texture (class element or path) – Default None.

  • visible (boolean) – If False, object is not displayed. Default: True

  • canvas (object) – Default is scene.

  • make_trail (boolean) – If True, object leaves a trail when moved.

  • up (vector) – A vector perpendicular to the axis.

  • group (object) – The group to which this object belongs.