Valeria Graziani – Geometric Typography

Codice V

let circleDiam=20
let angoloInGradi = 45;

function setup() {
createCanvas(400, 400);
frameRate(5)
}

function draw() {
background(220);

//colore randomico che cambia
fill(random(0, 255), random(0, 255),random(0, 255));

//creo il rettangolo storto
beginShape();

vertex(170, 300);
vertex(200, 300);
vertex(100, 100);
vertex(70, 100);

endShape(CLOSE);

line(200, 300, 300, 105);

//il cerchio lo sposto più in basso cosi finirà a filo
circle(297,110, circleDiam);

}

Codice G

let circleDiam=20

function setup() {
createCanvas(400, 400);
frameRate(5)
if (mouseIsPressed === true) {
console.log(mouseX, mouseY)}
}

function draw() {
background(220);

noFill();
strokeWeight(1);
arc(width/2, height/2,200, 200,0.31, 5.65, );
//colore randomico che cambia
fill(random(0, 255), random(0, 255),random(0, 255));
circle (281, 143, circleDiam)
rect(200,200,100,30)

}

Commenti

Lascia un commento