SHARE
TWEET

Untitled

a guest Sep 17th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void crearCirculos() {
  2.  
  3.   int numCirculos = 10;
  4.   int radius = 30;
  5.  
  6.   float theta = TWO_PI / numCirculos;
  7.  
  8.   pushMatrix();
  9.  
  10.   for( int i = 0; i<numCirculos; i++ ) {
  11.  
  12.     int posX = int(radius * cos(i*theta));
  13.     int posY = int(radius * sin(i*theta));
  14.  
  15.     pushMatrix();
  16.       translate( posX, posY);
  17.       ellipse(0,0,10,10);
  18.     popMatrix();
  19.   }
  20.  
  21.   popMatrix();
  22.  
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top