/* Name: Stroke Description: Version: 1.0 Author: Noritaka Horio Website: http://sharedhat.com/ */ int pointX, pointY; void setup() { size(width,height); background(#000000); smooth(); noLoop(); pointX = width / 2; pointY = height / 2; } void draw() { drawA(random(10, width - 10), random(10, height - 10)); drawA(random(10, width - 10), random(10, height - 10)); } void drawA(float pointX, float pointY) { for (int i = 0; i < 36; i++) { float len = random(30, width); float r = map(i, 0, 36, 0, TWO_PI) - HALF_PI; float x = cos(r) * len + pointX; float y = sin(r) * len + pointY; stroke(#ffffff, random(30, 100)); strokeWeight(random(1, 3)); line(x, y, pointX, pointY); } }