Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

### curveVertex()

Examples

    noFill();
    beginShape();
    curveVertex(84,  91);
    curveVertex(84,  91);
    curveVertex(68,  19);
    curveVertex(21,  17);
    curveVertex(32, 100);
    curveVertex(32, 100);
    endShape();

Description

Specifies vertex coordinates for curves. This function may only be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). The first and last points in a series of curveVertex() lines will be used to guide the beginning and end of a 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 curveVertex() will draw the curve between the second, third, and fourth points. The curveVertex() function is an implementation of Catmull-Rom splines. Using the 3D version of requires rendering with P3D or OPENGL (see the Environment reference for more information).

Syntax

    curveVertex(x, y)
    curveVertex(x, y, z)

Parameters

x | The x-coordinate of the vertex, either a float or int
y | The y-coordinate of the vertex, either a float or int
z | The z-coordinate of the vertex, either a float or int

Returns | None
Usage | Application & Web
Related | curve() beginShape() endShape() vertex() bezierVertex()

Updated on August 30, 2010 04:29:39pm EDT