original_docstring: plots a vector as an arrow. origin is the origin of the vector,
      and v is the vector
docstring: plots a vector as an arrow. origin is the origin of the vector,
  and v is the vector
docstring_tokens: plots a vector as an arrow . origin is the origin of the vector and v is the vector
code: def plot_vector_arrow2d(origin, v, **kwargs):
      """plots a vector as an arrow. origin is the origin of the vector,
      and v is the vector"""
      head_length = 0.3 * v.mag()
      head_width = 0.08 * v.mag()
  
      end_pos = origin.add(v)
      v_norm = v.norm()
      end_left = v_norm.cross(Vector3(0,0,1)).fmul(head_width)
      end_right = end_left.neg()
      end_left = end_left.add(end_pos)
      end_right = end_right.add(end_pos)
      end_tip = end_pos.add(v_norm.fmul(head_length))
  
      plot_vector_list2d([origin, end_pos, end_left, end_tip, end_right, end_pos], **kwargs)
code_tokens: def plot_vector_arrow2d ( origin , v , ** kwargs ) : head_length = 0.3 * v . mag ( ) head_width = 0.08 * v . mag ( ) end_pos = origin . add ( v ) v_norm = v . norm ( ) end_left = v_norm . cross ( Vector3 ( 0 , 0 , 1 ) ) . fmul ( head_width ) end_right = end_left . neg ( ) end_left = end_left . add ( end_pos ) end_right = end_right . add ( end_pos ) end_tip = end_pos . add ( v_norm . fmul ( head_length ) ) plot_vector_list2d ( [ origin , end_pos , end_left , end_tip , end_right , end_pos ] , ** kwargs )
short_docstring: plots a vector as an arrow.
short_docstring_tokens: plots a vector as an arrow .
comment: """plots a vector as an arrow. origin is the origin of the vector,
      and v is the vector"""