AutoHotkey | Android | Arduino | COMM140 | Fractals | Grammar Checkers | Knots | A Million Dots Activity | Processing | Processing for Scratch Users | Redbubble | Tutorials | Weather | World Time Meeting Planner | Favicon Generator.
Home > Tutorials > Processing > Processing Examples > Scintillating Grid
// Scintillating Grid // Author: Rupert Russell // October 2, 2010 // Schtauf, M., Lingelbach, B., Wrist, E.R. (1997) // The scintillating grid illusion. Vision Research, // 37, 1033-1038. void setup() { size(283, 200); background(0); // black background strokeWeight(3); // medium weight lines smooth(); // antialias lines stroke(100, 100, 100); // dark grey colour for lines noLoop(); } void draw() { int step = 25; // grid spacing //vertical lines for (int x = step; x < width; x = x + step){ line(x, 0, x, height); } //horizontal lines for (int y = step; y < height; y = y + step){ line(0, y, width, y); } // Circles smooth(); ellipseMode(CENTER); stroke(255); // white circles for (int i = step; i < width -5; i = i + step) { for (int j = step; j < height -15; j = j + step) { strokeWeight(6); point(i, j); } } } // Save tif when mouse is clicked void mouseClicked(){ noLoop(); save("scintillating.png"); }
APA citation:
Russell, R. (2018, June 28, 11:48 am). Scintillating grid.
Retrieved December 22, 2024, from http://www.rupert.id.au/tutorials/processing/examples/scintillating.php
Last refreshed: December 22 2024. 08:07.12 pm
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.