Advertisement
Guest User

Untitled

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