Tut­o­r­i­a­l Week 4

by Brittany Klaassens
  • Show Sketch
/** @peep sketchcode */ 
float diam = 50, theta;
void setup(){
size(400, 400);
background(random(255), random(255), random(255));
smooth(8);
noStroke();
yinYangBackground1()
}
 
void yinYangBackground1(){
   pushMatrix();
   translate(width/1.1, height/1.1);
   rotate(theta);
   fill(0, 0, 0);
   arc(0, 0, diam, diam, PI/2, PI+PI/2);
   fill(255, 255, 255);
   arc(0,0,diam, diam, PI+PI/2,TWO_PI+PI/2);
 
   fill(0, 0, 0);
   ellipse(0, -diam/4, diam/2, diam/2);
   fill(255, 255, 255);
   ellipse(0, diam/4, diam/2, diam/2);
 
   fill(255, 255, 255);
   ellipse(0, -diam/4, diam/8, diam/8);
   fill(0, 0, 0);
   ellipse(0, diam/4, diam/8, diam/8);
 
   popMatrix();
 
   pushMatrix();
   translate(width/1.1, height/10.1);
   rotate(theta);
   fill(0, 0, 0);
   arc(0, 0, diam, diam, PI/2, PI+PI/2);
   fill(255, 255, 255);
   arc(0,0,diam, diam, PI+PI/2,TWO_PI+PI/2);
 
   fill(0, 0, 0);
   ellipse(0, -diam/4, diam/2, diam/2);
   fill(255, 255, 255);
   ellipse(0, diam/4, diam/2, diam/2);
 
   fill(255, 255, 255);
   ellipse(0, -diam/4, diam/8, diam/8);
   fill(0, 0, 0);
   ellipse(0, diam/4, diam/8, diam/8);
 
   popMatrix();
 
   pushMatrix();
   translate(width/10.1, height/1.1);
   rotate(theta);
   fill(0, 0, 0);
   arc(0, 0, diam, diam, PI/2, PI+PI/2);
   fill(255, 255, 255);
   arc(0,0,diam, diam, PI+PI/2,TWO_PI+PI/2);
 
   fill(0, 0, 0);
   ellipse(0, -diam/4, diam/2, diam/2);
   fill(255, 255, 255);
   ellipse(0, diam/4, diam/2, diam/2);
 
   fill(255, 255, 255);
   ellipse(0, -diam/4, diam/8, diam/8);
   fill(0, 0, 0);
   ellipse(0, diam/4, diam/8, diam/8);
 
   popMatrix();
 
   pushMatrix();
   translate(width/10.1, height/10.1);
   rotate(theta);
   fill(0, 0, 0);
   arc(0, 0, diam, diam, PI/2, PI+PI/2);
   fill(255, 255, 255);
   arc(0,0,diam, diam, PI+PI/2,TWO_PI+PI/2);
 
   fill(0, 0, 0);
   ellipse(0, -diam/4, diam/2, diam/2);
   fill(255, 255, 255);
   ellipse(0, diam/4, diam/2, diam/2);
 
   fill(255, 255, 255);
   ellipse(0, -diam/4, diam/8, diam/8);
   fill(0, 0, 0);
   ellipse(0, diam/4, diam/8, diam/8);
 
   popMatrix();
 
}

Comments

Nobody has said anything yet.