First time posting on here, so I’m not sure how everything works. But I’m trying to copy the eye I have already made with a for loop. Earlier I tried to do them all individually but the eyes vanished completely. Not all great with Java so this is probably an easy fix. Recently made the int=230 so the program would understand it. Any help would be appreciated.
int a = 230;
void setup()
{
size(600, 600);
background(32, 55, 150);
int r= 0;
}
void draw()
{
for (int i=0; i<100; i++)
{
noLoop();
Rays(width/2, height/2, random(10, 0.5), random(0.1, 0.1), 8*PI/50*i+random(PI/100), (int)random(58, 128));
Rays(width/2, height/2, random(20, 0.10), random(0.8, 0.8), 8*PI/50*i+random(PI/100), (int)random(58, 128));
Rays(width/2, height/2, random(30, 0.20), random(0.8, 0.8), 8*PI/50*i+random(PI/100), (int)random(58, 128));
}
Owl();
}
void Rays (int a, int b, float sx, float sy, float angle, int alpha)
{
pushMatrix();
translate(a, b);
rotate(angle);
scale(sx, sy);
fill(255, 226, 94, alpha);
noStroke();
beginShape();
vertex(0, 0);
bezierVertex(0, 24, 0, -54, 30, -72);
bezierVertex(54, -90, 72, -117, 72, -144);
bezierVertex(100, -144, 96, -96, 78, -72);
bezierVertex(66, -44, 0, -36, 0, 0);
endShape();
popMatrix();
}
void Owl()
{
//body
smooth();
noStroke();
fill(207, 178, 128);
ellipse(width/2, height/2, 400, 400);
ellipse(320, 255, 400, 400);
//face with beige
fill(189, 154, 94);
ellipse(245, 220, 210, 210);
ellipse(365, 220, 210, 210);
arc(245, 245.5, 200, 250, 0, PI);
arc(365, 245.5, 200, 250, 0, PI);
//face with white
fill(255);
ellipse(245, 230, 200, 200);
ellipse(365, 230, 200, 200);
arc(245, 230, 200, 250, 0, PI);
arc(365, 230, 200, 250, 0, PI);
//face with dark gray
fill(186, 186, 186);
ellipse(245, 228.5, 165, 165);
ellipse(365, 228.5, 165, 165);
arc(250, 250, 170, 170, 0, PI);
arc(350, 250, 170, 170, 0, PI);
//face with gray
fill(227, 227, 227);
ellipse(245, 230, 150, 150);
ellipse(365, 230, 150, 150);
arc(250, 250, 150, 150, 0, PI);
arc(350, 250, 150, 150, 0, PI);
//beak
fill(26, 27, 32);
ellipse(300,290,20,20);
noStroke();
fill(26, 27, 32);
beginShape(TRIANGLES);
vertex(300, 360);
vertex(290, 290);
vertex(310, 290);
endShape();
//-----------------
for(int a=230; a>400; a= a+50);
fill(181, 106, 0);
strokeWeight(5);
stroke(247, 157, 47);
ellipse(a, 230, 90, 90);
//inner eye
noStroke();
fill(0);
ellipse(230, 230, 55.5, 55.5);
//ellipse(300, 266, 70,70);
//middle eye
pushMatrix();
fill(255);
ellipse(230, 230, 10, 10);
//iris
noStroke();
fill(255);
ellipse(215, 220, 20, 20);
popMatrix();
//------------------------
//feathers
noStroke();
smooth();
fill(117, 47, 13);
for (int i=220; i < 400; i= i+50)
ellipse(i, 400, 10, 20);
noStroke();
smooth();
fill(117, 47, 13);
for (int i=250; i < 400; i= i+50)
ellipse(i, 450, 10, 20);
//feathers
noStroke();
smooth();
fill(117, 47, 13);
for (int i=220; i < 400; i= i+50)
ellipse(i, 400, 10, 20);
noStroke();
smooth();
fill(117, 47, 13);
for (int i=250; i < 400; i= i+50)
ellipse(i, 450, 10, 20);
}
I have another question to ask but I'll leave that out for now.