I have the eye() function and I want to duplicate it several times that every eye look in a different direction (now random number copy to all function instances)
let x=0;
let y=0;
function setup() {
createCanvas(500, 500);
}
function draw() {
background(0);
translate(250,250);
eye();
}
function eye(){
noStroke();
fill(255);
circle(0,0,80);
fill(0);
circle(x,y,40);
if(frameCount > 30) {
x = random(30)*cos( random(360) );
y = random(30)*sin( random(360) );
frameCount=0;
}
}