genuary1 - loop
Quick coding practice for genuary. I probably won't have time for everyday, but I am hoping to do at least 2-3 per week.
let d = 10
let nC = 10;
function setup(){
cnv = createCanvas(500,500)
background(255);
angleMode(DEGREES);
strokeWeight(0.2)
noStroke()
}
function draw(){
background(255)
translate(width/2,height/2);
t = frameCount*2
for(let g=1;g<nC+1;g++){
cDraw(g*20,g*4)
}
if(t===720){
}
if(t>0&&t<=360){
}
}
function cDraw(r,k){
for(let j = 0;j<k;j++){
if(j%2===0){
fill(0)
h = 2
}else{
fill(255)
h=3
}
a = 360/k
s=10/r ;
circle(r*sin(t*s+j*a),r*cos(t*s+j*a),d*h)
}
}
function savF(){
save(cnv, 'loop'+ t+'.jpg');
}