PIXEL

Synopsis
PIXEL
Description

Outputs the color of the pixel that is currently under the turtle. Depending on how the color was last set, the output is either a three item list of numbers that represents the red, green, and blue intensities of the pixel, or an integer index of the pixel's color. For an explanation of a color vector see Using Color.

PIXEL can be used in PERSPECTIVE mode but the pixel whose color is output is what ever is under the turtle in the 2D projection.

Example
CLEARSCREEN
SHOW PIXEL
[255 255 255]
FORWARD 1
SHOW PIXEL
[0 0 0]
BACK 1
SHOW PIXEL
[0 0 0]
See Also
SETPIXEL

SourceForge.net Logo