Skip to content

Instantly share code, notes, and snippets.

@akinoniku akinoniku/a.js
Created Mar 21, 2019

Embed
What would you like to do?
p5
function setup() {
createCanvas(801, 801);
background(255);
}
function draw() {
//rotate(radians(0));
for (let i = 0; i <= width; i += 100) {
line(i, 0, i, height);
}
for (let i = 0; i <= height; i += 100) {
line(0, i, width, i);
let randomX = random(0, width);
let randomY = random(0, height);
let randomA = random(0, 100);
ellipse(randomX, randomY, random(100));
noLoop();
}
for (let i = 0; i <= height; i += 100) {
let randomX = random(0, width);
let randomY = random(0, height);
let randomA = random(-50, 50);
square(randomX, randomY, random(50));
line(randomX, randomY, randomX+randomA, randomY+randomA);
rotate(random(0.25));
noLoop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.