a port of the Processing Visualization Language


by Daniel Shiffman. Mouse horizontal location controls size of dots. Creates a simple pointillist effect using ellipses colored according to pixels in an image.

Original Processing.org Example: Pointillism

// All Examples Written by Casey Reas and Ben Fry

// unless otherwise stated.

// @pjs preload must be used to preload the image so that it will be available when used in the sketch  

/* @pjs preload="data/eames.jpg"; */

PImage a;

void setup()


  a = loadImage("data/eames.jpg");






void draw()


  float pointillize = map(mouseX, 0, width, 2, 18);

  int x = int(random(a.width));

  int y = int(random(a.height));

  color pix = a.get(x, y);

  fill(pix, 126);

  ellipse(x, y, pointillize, pointillize);

Fork me on GitHub