point() \ Language (API) \ Processing 1.0
Author: Casey Reas & Ben Fry
Description: Processing is an electronic sketchbook for developing ideas. It is a context for learning fundamentals of computer programming within the context of the electronic arts.
Keywords: Processing, Processing, Interactive Media, Electronic Arts, Programming, Java, Ben Fry, Casey Reas

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 | ### point()
Examples |
    point(30, 20);
    point(85, 20);
    point(85, 75);
    point(30, 75);
    size(100, 100, P3D);
    point(30, 20, -50);
    point(85, 20, -50);
    point(85, 75, -50);
    point(30, 75, -50);
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 using the z parameter requires the P3D or OPENGL parameter in combination with size as shown in the above example. Due to what appears to be a bug in Apple's Java implementation, the point() and set() methods are extremely slow in some circumstances when used with the default renderer. Using P2D or P3D will fix the problem. Grouping many calls to point() or set() together can also help. (Bug 1094)
Syntax |
    point(x, y)
    point(x, y, z)
Parameters |
x | int or float: x-coordinate of the point
y | int or float: y-coordinate of the point
z | int or float: z-coordinate of the point
Returns | None
Usage | Web & Application
Related | beginShape()

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