Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement