Advertisement
bethdps

Flor

Oct 5th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. void setup(){
  2.   size (300, 300);
  3. }
  4.  
  5. void draw(){
  6.   for (int i=0; i<=100; i++){
  7.     flor3(random(300), random(300), random(25));
  8.   }
  9.   noLoop();
  10.  
  11. }
  12.  
  13. void circulo(float x, float y, float r){
  14.   ellipse(x, y, 2*r, 2*r);
  15. }
  16.  
  17. void flor3(float x, float y, float r){
  18.   circulo(x, y, r);
  19.   circulo(x+(2*r)*0.7, y+(2*r)*0.7, r);
  20.   circulo(x-(2*r)*0.7, y-(2*r)*0.7, r);
  21.   circulo(x-(2*r)*0.7, y+(2*r)*0.7, r);
  22.   circulo(x+(2*r)*0.7, y-(2*r)*0.7, r);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement