Statements and Comments
Coordinates
Width and Height
Setup and Draw
No Loop
Loop
Redraw
Functions
Recursion
Recursion 2
CreateGraphics
Points and Lines
Shape Primitives
Simple Curves
Pie Chart
Vertices
Triangle Strip
Bezier
Bezier Ellipse
Variables
Integers and Floats
True/False
Characters and Strings
Datatype Conversion
Variable Scope
Iteration
Embedded Iteration
Conditionals 1
Conditionals 2
Logical Operators
Increment/Decrement
Operator Precedence
Modulo
Distance 1D
Distance 2D
Sine
Sine and Cosine
Sine Wave
Additive Wave
Polar to Cartesian
Arctangent
Graphing 2D Equation
Random
Double Random
Noise 1D
Noise 2D
Noise 3D
NoiseWave
Letters
Words
Displaying
Background Image
Pointillism
Transparency
Sprite
Alphamask
CreateImage
Hue
Saturation
Brightness
Color Wheel
Reading
Creating
Relativity
Linear Gradient
Radial Gradient
Wave Gradient
Translate
Scale
Rotate
Triangle Flower
Arm
Mouse 1D
Mouse 2D
MousePress
Mouse Signals
Easing
Constrain
Storing Input
Mouse Functions
Keyboard
Keyboard Functions
Milliseconds
Clock
Array
Array 2D
Array Objects
Objects
Multiple Constructors
Composite Objects
Inheritance
Neighborhood
Embedded Links
Loading Images
Examples for Processing (BETA) version 127+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know .
Vertices.
The beginShape() function begins recording vertices for a shape and endShape() stops recording. A vertex is a location in space specified by X, Y, and sometimes Z coordinates. After calling the beginShape() function, a series of vertex() functions must follow. To stop drawing the shape, call the endShape() functions.
size(200, 200);
background(0);
noFill();
stroke(102);
beginShape();
curveVertex(168, 182);
curveVertex(168, 182);
curveVertex(136, 38);
curveVertex(42, 34);
curveVertex(64, 200);
curveVertex(64, 200);
endShape();
stroke(51);
beginShape(LINES);
vertex(60, 40);
vertex(160, 10);
vertex(170, 150);
vertex(60, 150);
endShape();
stroke(126);
beginShape();
vertex(60, 40);
bezierVertex(160, 10, 170, 150, 60, 150);
endShape();
stroke(255);
beginShape(POINTS);
vertex(60, 40);
vertex(160, 10);
vertex(170, 150);
vertex(60, 150);
endShape();