Skip to main content
`Ctrl`+`K`

# vispy.geometry.curves module

vispy.geometry.curves.calc_sq_distance(x1, y1, x2, y2)

vispy.geometry.curves.curve3_bezier(p1, p2, p3)

  Generate the vertices for a quadratic Bezier curve.

  The vertices returned by this function can be passed to a LineVisual or ArrowVisual.

  Parameters:
    p1 array

      2D coordinates of the start point

    p2 array

      2D coordinates of the first curve point

    p3 array

      2D coordinates of the end point

  Returns:
    coords list

      Vertices for the Bezier curve.

  See also

  `curve4_bezier`

  Notes

  For more information about Bezier curves please refer to the Wikipedia page.

vispy.geometry.curves.curve4_bezier(p1, p2, p3, p4)

  Generate the vertices for a third order Bezier curve.

  The vertices returned by this function can be passed to a LineVisual or ArrowVisual.

  Parameters:
    p1 array

      2D coordinates of the start point

    p2 array

      2D coordinates of the first curve point

    p3 array

      2D coordinates of the second curve point

    p4 array

      2D coordinates of the end point

  Returns:
    coords list

      Vertices for the Bezier curve.

  See also

  `curve3_bezier`

  Notes

  For more information about Bezier curves please refer to the Wikipedia page.