Benutzer:Justus
Aus exmediawiki
050525
design a cover for a book with one rule, that gets repeated.
rule: connect a corner with the center of a line at (one of) the opposite side(s) with masking tape.
(inconsistent) outcome:
120525
Exmediawiki Into
break
https://bmoren.github.io/p5js-cheat-sheet/
Code01:
function setup() {
createCanvas(400, 400); noFill();
}
function draw() {
background(220);
rect(width / 2 - 100 / 2, height / 2 - 100 / 2, 100, 100); rect(width / 2 - 200 / 2, height / 2 - 250 / 2, 200, 250); rect(width / 2 - 150 / 2, height / 2 - 230 / 2, 150, 230); rect(width / 2 - 40 / 2, height / 2 - 40 / 2, 40, 40); rect(width / 2 - 190 / 2, height / 2 - 260 / 2, 190, 260);
}
https://editor.p5js.org/jkfmn/full/-Do64urgx
Code02:
function setup() {
createCanvas(400, 600); //noLoop(); //Loop an/aus noFill();
}
function draw() {
background(220); let rectHeight = random(50, 100); //variable für die des dreiecks vergeben let rectWidth = random(50, 100); let rectX = width/2 - random(50,100)/2; //einfach Wert durch random() ersetzt let rectY = height/2 - random(50,100)/2; rect(rectX,rectY,rectWidth,rectHeight) //how to safe the singular frames???
}
https://editor.p5js.org/jkfmn/full/pf3QVzbWD
Code03:
function setup() {
createCanvas(500, 600); noFill();
}
function draw() {
background(220);
rect(100,300,200,100); rect(300,250,100,150); rect(150,250,75,50); rect(225,250,75,50); rect(300,200,100,50); rect(325,175,50,25); triangle(100,300,150,300,150,250) triangle(300,200,325,175,325,200) triangle(375,200,375,175,400,200) triangle(325,175,375,175,350,50) let FB = 25; //Breite, Höhe und X, Y des ersten Fensters let FH = 50; let FX = 125; let FY = 335; let AB = 17.5; //Abstand der Fenster
rect(FX, FY, FB, FH); rect(FX+FB+AB,FY, FB,FH); rect(FX+(FB+AB)*2,FY, FB,FH); rect(FX+(FB+AB)*3,FY, FB,FH); ellipse(FX+FB/2,FY,FB); ellipse(FX+FB/2+(FB+AB),FY,FB); ellipse(FX+FB/2+(FB+AB)*2,FY,FB); ellipse(FX+FB/2+(FB+AB)*3,FY,FB);
}
https://editor.p5js.org/jkfmn/full/-Do64urgx