Advertisement
Guest User

Untitled

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