Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.77 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.    float x, y;
  7.  // PFont font;
  8.      
  9.  void setup() {
  10.     smooth();
  11.    frameRate(60);
  12.    
  13.    size(1000,1000);
  14.  
  15.  
  16.    
  17.    float col1 = random(25,225);
  18.    float col2 = random(25,225);
  19.    float col3 = random(25,225);
  20.    
  21.     background(245);
  22.    
  23.     float q = 500;
  24.     float w = 500;
  25.    
  26.      translate(q,w);
  27.      stroke(col1,col2,col3,200);
  28.     float radius1 =10;
  29.      beginShape();
  30.  // curveVertex(300, 600);
  31.  
  32.    for ( float ang = -10; ang <= 370; ang += 10, radius1 = radius1+random(-4,4) ) {
  33.      
  34.        if ( ang == -10 ) {  // When 'i' is less than 35...
  35.     radius1 = 60;   //...set the color to black
  36.   }
  37.      if ( ang == 0 ) {  // When 'i' is less than 35...
  38.     radius1 = 60;   //...set the color to black
  39.   }
  40.       if ( ang == 360 ) {  // When 'i' is less than 35...
  41.     radius1 = 60;   //...set the color to black
  42.   }
  43.          if ( ang == 370 ) {  // When 'i' is less than 35...
  44.     radius1 = 60;   //...set the color to black
  45.   }
  46.  
  47.    if ( ang == 220 ) {  // When 'i' is less than 35...
  48.     radius1 = radius1*1.2;   //...set the color to black
  49.   }
  50.    if ( ang == 240 ) {  // When 'i' is less than 35...
  51.     radius1 = radius1*1.2;   //...set the color to black
  52.   }
  53.     if ( ang == 260 ) {  // When 'i' is less than 35...
  54.     radius1 = radius1*1.2;   //...set the color to black
  55.   }
  56.  
  57.    if ( ang == 280 ) {  // When 'i' is less than 35...
  58.     radius1 = radius1/1.2;   //...set the color to black
  59.   }
  60.   if ( ang == 300 ) {  // When 'i' is less than 35...
  61.     radius1 = radius1/1.2;   //...set the color to black
  62.   }
  63.   if ( ang == 320 ) {  // When 'i' is less than 35...
  64.     radius1 = radius1/1.3;   //...set the color to black
  65.   }
  66.  
  67.     noFill();
  68.    strokeWeight(1.5);
  69.    //stroke(#f29b8c);
  70.    
  71.  /*
  72.     fill(#f29b8c,125);
  73.      noStroke(); */
  74.      
  75. float rad = radians(ang);
  76. x = radius1 * cos(rad);  
  77. y = radius1 * sin(rad);
  78.  
  79.  
  80.  
  81. curveVertex(x,y);
  82.  }
  83.  endShape();
  84.    
  85.  
  86.  
  87.  
  88.  float q2 = random(-50,50);
  89.     float w2 = random(-50,50);
  90.      translate(q2,w2);
  91.      fill(col2,col3,col1);
  92.   float radius =100;
  93.      beginShape();
  94.  
  95.  
  96.    for ( float ang = 0; ang <= 360; ang += 10, radius = radius+random(-2,2) ) {
  97.      
  98.        if ( ang == 00 ) {  // When 'i' is less than 35...
  99.     radius = 25;   //...set the color to black
  100.   }
  101.      if ( ang == 10 ) {  // When 'i' is less than 35...
  102.     radius = 25;   //...set the color to black
  103.   }
  104.       if ( ang == 350 ) {  // When 'i' is less than 35...
  105.     radius = 25;   //...set the color to black
  106.   }
  107.          if ( ang == 360 ) {  // When 'i' is less than 35...
  108.     radius = 25;   //...set the color to black
  109.   }
  110.  /*
  111.     noFill();
  112.      strokeWeight(1.5);
  113. stroke(#ed83bf);
  114. */
  115.  //fill(random(25,225),random(25,225),random(25,225));
  116.  //fill(#00f3ff);
  117.      noStroke();
  118.      
  119. float rad = radians(ang);
  120. x = radius * cos(rad);  
  121. y = radius * sin(rad);
  122.  
  123.  
  124. curveVertex(x,y);
  125.  }
  126.  endShape();
  127.  
  128.   float q1 = -q2;
  129.     float w1 = -w2;  
  130.      translate(q1,w1);
  131.      stroke(col1+30,col2-30,col3+30);
  132.   float radius2 =200;
  133.      beginShape();
  134.  // curveVertex(300, 600);
  135.  
  136.    for ( float ang = -20; ang <= 380; ang += 20, radius2 = radius2+random(-8,8) ) {
  137.      
  138.        if ( ang == -20 ) {  // When 'i' is less than 35...
  139.     radius2 = 50;   //...set the color to black
  140.   }
  141.      if ( ang == 00 ) {  // When 'i' is less than 35...
  142.     radius2 = 50;   //...set the color to black
  143.   }
  144.       if ( ang == 360 ) {  // When 'i' is less than 35...
  145.     radius2 = 50;   //...set the color to black
  146.   }
  147.          if ( ang == 380 ) {  // When 'i' is less than 35...
  148.     radius2 = 50;   //...set the color to black
  149.   }
  150.  
  151.      if ( ang == 220 ) {  // When 'i' is less than 35...
  152.     radius2 = radius2*1.2;   //...set the color to black
  153.   }
  154.    if ( ang == 240 ) {  // When 'i' is less than 35...
  155.     radius2 = radius2*1.2;   //...set the color to black
  156.   }
  157.     if ( ang == 260 ) {  // When 'i' is less than 35...
  158.     radius2 = radius2*1.2;   //...set the color to black
  159.   }
  160.  
  161.    if ( ang == 280 ) {  // When 'i' is less than 35...
  162.     radius2 = radius2/1.2;   //...set the color to black
  163.   }
  164.   if ( ang == 300 ) {  // When 'i' is less than 35...
  165.     radius2 = radius2/1.2;   //...set the color to black
  166.   }
  167.   if ( ang == 320 ) {  // When 'i' is less than 35...
  168.     radius2 = radius2/1.3;   //...set the color to black
  169.   }
  170.  
  171.  
  172.  
  173.     noFill();
  174.      strokeWeight(1.5);
  175. //stroke(#f7b566);
  176. // stroke(random(255),random(255),random(255));
  177.  /*
  178.  fill(#f7b566,100);
  179.      noStroke();
  180.     */
  181.      
  182. float rad = radians(ang);
  183. x = radius2 * cos(rad);  
  184. y = radius2 * sin(rad);
  185.  
  186.  
  187. curveVertex(x,y);
  188.  }
  189.  endShape();
  190.  
  191. /* fill(0);
  192. font = createFont("Roboto", 22);
  193. textFont(font);
  194. textLeading(19);
  195. text("   Мой\n   шампунь\nбар", 50, 50);
  196.  
  197.  */
  198.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement