poster in de wolken met Y rotatie

 

 

 

 

 

 

poster in de wolken met Y rotatie

 

 

 

 

poster in de wolken met Y rotatie

 

 

 

poster in de wolken met Y rotatie

 

 

poster in de wolken met Y rotaties.                                       terug naar de inleiding
 
 

float x; 
float y; 
float n;  
int i; int j; int k; int l;int m; int o; int p; int q; 
 
void setup() { 
 fullScreen(P3D); 
 // size(960,540, P3D); 
  x  = width/2; 
  y  = height/2; 
  n  = height/30; 
} 
 
void draw() { 
  background(#E6FBFF); 
  //De onder en bovenbalken 
  rectMode(CENTER);  
  fill(#C5E857);  
  rect(x, y-10.5*n, n*40, n, n);  
  rect(x, y+10.5*n, n*40, n, n);  
  fill(#F78794, 100); 
 
  //Roterende ellipse li 
  pushMatrix(); 
  translate(x-20*n, y); 
  rotateY(radians(i)); 
  i = i +1; 
  ellipse(0, 0, n*4, n*20);  
  popMatrix(); 
 
  //roterende ellipse re 
  pushMatrix(); 
  translate(x+20*n, y); 
  rotateY(radians(-j)); 
  j = j +1; 
  ellipse(0, 0, n*4, n*20);  
  popMatrix(); 
 
  ellipse(x+20*n, y, n*4, n*20);  
  ellipse(x-20*n, y, n*4, n*20);  
  fill(0, 25, 200, 50);  
 // ellipse(x, y, n*30, n*20);  
  ellipse(x, y, n*20, n*20); 
 
  //roterende arc en ellipse li 
  fill(100, 25, 100, 100);  
  pushMatrix(); 
  translate(x-14*n, y); 
  rotateY(radians(-k)); 
  k = k + 1; 
  ellipse(0, 0, n*8, n*12); 
  noFill(); 
  arc(0, -4*n, 6*n, 12*n, radians(180), radians(360)); 
  arc(0, 4*n, 6*n, 12*n, radians(0), radians(180)); 
  fill(0, 255, 0); 
  popMatrix(); 
   
   //roterende arc en ellipse Re 
  fill(100, 25, 100, 100);  
  pushMatrix(); 
  translate(x+14*n, y); 
  rotateY(radians(o)); 
  o = o + 1; 
  ellipse(0, 0, n*8, n*12); 
  noFill(); 
  arc(0, -4*n, 6*n, 12*n, radians(180), radians(360)); 
  arc(0, 4*n, 6*n, 12*n, radians(0), radians(180)); 
  fill(0, 255, 0); 
  popMatrix(); 
 
  //roterende driehoek li boven 
  pushMatrix(); 
  translate(x-14*n, y-7*n); 
  rotateY(radians(-l)); 
  l = l + 1; 
  triangle(-2*n, +n, 0, -n, 2*n, n);  
  popMatrix(); 
 
  //roterende driehoek li onder 
  pushMatrix(); 
  translate(x-14*n, y+7*n); 
  rotateY(radians(-m)); 
  m = m + 1; 
  triangle(-2*n, -n, 2*n, -n, 0, n);  
  popMatrix(); 
   
   
   //roterende driehoek re boven 
  pushMatrix(); 
  translate(x+14*n, y-7*n); 
  rotateY(radians(p)); 
  p = p + 1; 
  triangle(-2*n, +n, 0, -n, 2*n, n);  
  popMatrix(); 
 
  //roterende driehoek Re onder 
  pushMatrix(); 
  translate(x+14*n, y+7*n); 
  rotateY(radians(q)); 
  q = q + 1; 
  triangle(-2*n, -n, 2*n, -n, 0, n);  
  popMatrix(); 
  //de tekst 
  textAlign(CENTER);  
  textSize(n*2);  
  fill(255, 0, 0);  
  text("in de wolken", x, y-4*n);  
  text("met", x, y+n/4);  
  text("ruitjespapier", x, y+4*n); 
  textSize(n);  
  text("een 3d animatie met Y rotaties", x, y+13*n); 
}