Archived Sketch

This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.

View Source Code

Click record or press 'R'
to start/stop recording (max. 10 secs)

Click capture
to take a screenshot


Tutorial 006

// Tutorial 5: // - follow mouse // - mouseX -> hue shift WIDTH = 250; RATIO = 1; X_MIN = -20; X_MAX = 20; Y_MIN = -20; Y_MAX = 20; MOUSE_MOVE = true; // (a) color hsb(x, y) { float d = dist(u, v, mouseX, mouseY) / WIDTH * 10; // (b) float shift = mouseX / WIDTH; // (c) float bright = (1/d) * 255; // (d) float hue = shift * 255; // (e) return color(hue, 255, bright); // (f) }

Tutorial 006

// Tutorial 5: // - follow mouse // - mouseX -> hue shift WIDTH = 250; RATIO = 1; X_MIN = -20; X_MAX = 20; Y_MIN = -20; Y_MAX = 20; MOUSE_MOVE = true; // (a) color hsb(x, y) { float d = dist(u, v, mouseX, mouseY) / WIDTH * 10; // (b) float shift = mouseX / WIDTH; // (c) float bright = (1/d) * 255; // (d) float hue = shift * 255; // (e) return color(hue, 255, bright); // (f) }
e.g. "mouse, keyboard"
e.g. "visualization, fractal, mouse"
learn more about Creative Commons

As a Plus+ Member feature, this source code is hidden by the owner.