point()

Category: Shape

Subcategory: 2D Primitives

Complexity: Beginner

Description

Draws a point, a coordinate in space at the dimension of one pixel. The first parameter is the horizontal value for the point, the second value is the vertical value for the point, and the optional third value is the depth value. Drawing this shape in 3D with the z parameter requires the P3D parameter in combination with size() as shown in the above example.

Use stroke() to set the color of a point().

Related

Example

Code:
noSmooth();
point(30, 20);
point(85, 20);
point(85, 75);
point(30, 75);
Preview: