xxxxxxxxxx
232
function setup() {
createCanvas(700, 400);
frameRate(0.5);
background(255);
randomizerCall();
}
function draw() {
background(255);
randomizerCall();
}
function filler1(x, y) {
var i = x;
var j = y;
var k = 100;
while(i<x+60)
{
square(i,j,k);
i+=10;
j+=10;
k-=15;
}
}
function filler2(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+30)
{
square(i,j,k);
i+=5;
j+=5;
k-=15;
}
}
function filler3(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+30)
{
square(i,j,k);
i+=5;
j+=10;
k-=15;
}
}
function filler4(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+60)
{
square(i,j,k);
i+=10;
j+=5;
k-=15;
}
}
function filler5(x, y) {
var i = x;
var j = y;
var k = 100;
while(i<x+64)
{
square(i,j,k);
i+=5;
j+=5;
k-=7;
}
}
function filler6(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+26)
{
square(i,j,k);
i+=2;
j+=2;
k-=7;
}
}
function filler7(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+26)
{
square(i,j,k);
i+=2;
j+=5;
k-=7;
}
}
function filler8(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+62)
{
square(i,j,k);
i+=5;
j+=2;
k-=7;
}
}
function filler9(x, y) {
var i = x;
var j = y;
var k = 100;
while(i<x+60)
{
square(i,j,k);
i+=20;
j+=20;
k-=30;
}
}
function filler10(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+30)
{
square(i,j,k);
i+=10;
j+=10;
k-=30;
}
}
function filler11(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+30)
{
square(i,j,k);
i+=10;
j+=20;
k-=30;
}
}
function filler12(x,y) {
var i = x;
var j = y;
var k = 100;
while(i<x+60)
{
square(i,j,k);
i+=20;
j+=10;
k-=30;
}
}
function randomizer(x,y) {
let num = floor(random(12)) + 1;
print(num);
if(num==1)
{
filler1(x,y);
}
else if(num==2)
{
filler2(x,y);
}
else if(num==3)
{
filler3(x,y);
}
else if(num==4)
{
filler4(x,y);
}
else if(num==5)
{
filler5(x,y);
}
else if(num==6)
{
filler6(x,y);
}
else if(num==7)
{
filler7(x,y);
}
else if(num==8)
{
filler8(x,y);
}
else if(num==9)
{
filler9(x,y);
}
else if(num==10)
{
filler10(x,y);
}
else if(num==11)
{
filler11(x,y);
}
else
{
filler12(x,y);
}
}
function randomizerCall() {
for(let i = 0; i<601; i+=100)
{
for(let j =0; j<301; j+=100)
{
randomizer(i,j);
}
}
}