Examples Drawing Lines

Drawing Lines

Click and drag the mouse to draw a line.

This example demonstrates the use of several built-in variables. mouseX and mouseY store the current mouse position, while the previous mouse position is represented by pmouseX and pmouseY. * This example also shows the use of colorMode with HSB (hue-saturation-brightness), so that the first variable sets the hue.

Contributors: Jared Donovan, Animesh Sinha, Katie, Caleb Foss, Darren Kessner

Modified from Continuous Lines.

Originally ported from the Processing example Continuous Lines.

Drawing Lines is licensed under CC BY-NC-SA 4.0.