xxxxxxxxxx
104
var tileCount = 2;
var actRandomSeed = 0;
function setup() {
createCanvas(800, 800);
noStroke();
//rectMode(CENTER);
angleMode(DEGREES);
ellipseMode(CENTER);
}
function draw() {
background(248);
randomSeed(actRandomSeed);
for (var gridY = 0; gridY < tileCount; gridY++) {
for (var gridX = 0; gridX < tileCount; gridX++) {
let shades = ["#0b2954", "#edbe15", "#194d35","#e35346"];
let shade = random(shades);
cS = color(shade);
fill(cS);
var posX = width / tileCount * gridX;
var posY = height / tileCount * gridY;
var s = int(random(0, 2));
//var s = 0;
if (s == 0) {
//
fill(cS);
//ellipse(posX + width / tileCount / 2, posY + height / tileCount / 2, width / tileCount);
}
if (s == 1) {
//right
fill(cS);
//rect(posX+width / tileCount/10, posY+height/tileCount/10, width / tileCount/1.25);
}
if (s == 2) {
//vertical lines
for (x = posX; x < width; x = x + 4) {
line(x, posY, x, height);
}
}
fill("#edbe15");
//ellipse(posX +width / tileCount/14,posY +height / tileCount/14,width / tileCount/8);
//ellipse(posX+width / tileCount-width / tileCount/14,posY +height / tileCount/14,width / tileCount/8);
//ellipse(posX +width / tileCount/14,posY +height / tileCount-height / tileCount/14,width / tileCount/8);
//ellipse(posX+width / tileCount-width / tileCount/14,posY +height / tileCount-height / tileCount/14,width / tileCount/8);
fill("#194d35");
triangle(posX + width / tileCount, posY+ height / tileCount-height / tileCount/8, posX + width / tileCount, posY + height / tileCount, posX+width / tileCount-width / tileCount/8, posY + height / tileCount);
triangle(posX, posY, posX +width / tileCount/8, posY, posX, posY + height / tileCount/8);
triangle(posX, posY+ height / tileCount, posX +width / tileCount/8, posY+ height / tileCount, posX, posY + height / tileCount-height / tileCount/8);
triangle(posX+ width / tileCount, posY, posX +width / tileCount, posY+ height / tileCount/8, posX+width / tileCount-width / tileCount/8, posY);
// ellipse(posX+ width / tileCount/2,posY,width / tileCount/6);
// ellipse(posX+ width / tileCount,posY+ height / tileCount/2,width / tileCount/10);
noFill();
strokeWeight(0.25);
stroke(100);
rect(posX,posY,width / tileCount, height/tileCount)
noStroke();
}
}
}
function mouseReleased() {
actRandomSeed = random(100000);
tileCount = int(mouseX / 50);
}
//diamonds
//curvy lines
//dots