Py5Graphics.curve_vertex()

Py5Graphics.curve_vertex()#

Specifies vertex coordinates for curves.

Description#

Specifies vertex coordinates for curves. This method may only be used between Py5Graphics.begin_shape() and Py5Graphics.end_shape() and only when there is no MODE parameter specified to Py5Graphics.begin_shape(). The first and last points in a series of curve_vertex() lines will be used to guide the beginning and end of the curve. A minimum of four points is required to draw a tiny curve between the second and third points. Adding a fifth point with curve_vertex() will draw the curve between the second, third, and fourth points. The curve_vertex() method is an implementation of Catmull-Rom splines. Using the 3D version requires rendering with P3D.

This method is the same as curve_vertex() but linked to a Py5Graphics object. To see example code for how it can be used, see curve_vertex().

Underlying Processing method: PGraphics.curveVertex

Signatures#

curve_vertex(
    x: float,  # the x-coordinate of the vertex
    y: float,  # the y-coordinate of the vertex
    /,
) -> None

curve_vertex(
    x: float,  # the x-coordinate of the vertex
    y: float,  # the y-coordinate of the vertex
    z: float,  # the z-coordinate of the vertex
    /,
) -> None

Updated on March 06, 2023 02:49:26am UTC