xxxxxxxxxx
62
function setup() {
createCanvas(400, 400);
let foo=2;
// while(foo<width){
// ellipse(20*foo,pow(foo,2),20,20);
// foo=foo+3;
// print("the next val is", foo)
// }
// for(let x=2;x<width;x=x+3){
// ellipse(20*foo,pow(foo,2),20,20);
// foo=foo+3;
// print("the next val is", foo)
// }
// for(let xx=0;xx<width;xx=xx+30){
// for(let yy=0;yy<height;yy=yy+40){
// circle(xx,yy,5)
// }
// }
}
let foo=2;
function draw(){
frameRate(7)
background(255,255,255)
drawOneHouseAt(50)
for(let xx=0;xx<width;xx=xx+30){
for(let yy=0;yy<height;yy=yy+40){
circle(xx,yy,5)
}
}
ellipse(20*foo,pow(foo,2),20,20);
foo=foo+3;
print("the next val is", foo)
}
function drawOneHouseAt(x){
rect(x,50,40,40);
line(x,50,x+20,30);
line(x+20,30,x+40,50)
}