Day 56 - Star Map
For whatever reason (probably math) the idea of drawing clusters in a radiating pattern has eluded me in this challenge. I’ve had a few false starts but could never quite figure it out how it’s done - until today! I took my learnings from the rubber stamp recreations from last week and managed to figure it out. In fact, I made so many fun discoveries as I tweaked the code that I’m going to share a series of sketches around this theme this week. I love when such simple code produces such beautiful results. Also, as a change from last week, I’m hoping to require minimal user input to create these drawings, relying on the computer to do the work instead.
Sketch:
Drawings:
Code:
x1 = 0; y1 = 0; function setup() { createCanvas(700, 700); background(50); stroke(255); } function draw() { x1 = x1 + 1; y1 = y1 + 1; lines = random(20); rot = random(1); for (x = 0; x < 360; x = x + lines) { push(); translate(width / 2, height / 2); rotate(radians(x) + rot); point(x1, y1); pop(); } if (x1 > 150) { noLoop(); } }