text 4 circles.pde

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 4 circles.pde相关的知识,希望对你有一定的参考价值。

int i = 0, j =0, k =0, y=0, r, degreepoint = 0, d1, d2;
int angle1, angle2, point;
int radius = 400;

void setup()
{
  size(4000, 4000);
  background(255, 254, 233);
  noLoop();
}


void draw() {


  strokeWeight(3);


for (i = 0; i < width; i++){
   for (j = 0; j < 100; j++){
   stroke(215, 215, 215, int(random(50, 255)));
   point(random(0, width), random(0, width));
   }
   }


  stroke(0, 0, 0);



  //translate(width*0.25, height*0.25);
  pushMatrix();
  translate(width*.25, height*.25);
 
  for (k = 0; k < 360; k++) { 
    angle1 = k;
    angle2 = 360-k;
    line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
  }

  popMatrix();



  //translate(width*0.75, height*0.25);
  pushMatrix();
  translate(width*.5, height*.25);

  d1 = 0;
  d2 = 360;
  for (k = 0; k < 36; k++) { 

    line(radius*cos(radians(d1)), radius*sin(radians(d1)), radius*cos(radians(d2)), radius*sin(radians(d2)));
    line(radius*cos(radians(d1+90)), radius*sin(radians(d1+90)), radius*cos(radians(d2+90)), radius*sin(radians(d2+90)));

    d1+=10;
    d2-=10;
  }
  popMatrix();

  pushMatrix();
  translate(width*.75, height*.25);

for (k = 0; k < 360; k++) { 

    if (k % 2 == 0) {
      angle1 = k;
      angle2 = k + 180; 
      line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
    }
  }
  
  
  popMatrix();

  pushMatrix();
  translate(width*.25, height*.5);

angle1 = 0;
point = 3;
  for (j = 0; j < 9; j++) {
   for (k = 0; k < 360; k++) {   
      angle2 = angle1 + point; 
      line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
       angle1 += point;
   }
   point = point*2;
}

  popMatrix();

  pushMatrix();
  translate(width*.5, height*.5);

  for (k = 0; k < 250; k++) { 
    angle1 = int(random(0, 360));
    angle2 = int(random(0, 360)); 
    line(radius*cos(angle1), radius*sin(angle1), radius*cos(angle2), radius*sin(angle2));
  }
  
  
  popMatrix();

  pushMatrix();
  translate(width*.75, height*.5);

  for (k = 0; k < 80; k++) { 
    angle1 = int(random(360));
    angle2 = 180-angle1;
    line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
  }
  
  popMatrix();

  pushMatrix();
  translate(width*.25, height*.75);

  for (k = 0; k < 360; k++) { 
    if (k % 3 == 0) {
      angle1 = k;
      angle2 = k + 120; 
      line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
    }
  }

  popMatrix();
  
pushMatrix();
translate(width*.5, height*.75);

  for (k = 0; k < 70; k++) { 

      angle1 = int(random(360));
      angle2 = angle1 + 180; 
      line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
  }
  

  popMatrix();


pushMatrix();
translate(width*.75, height*.75);

  
angle1 = 0;
point = 2;
  for (j = 0; j < 10; j++) {
   for (k = 0; k < 360; k++) {   
      angle2 = angle1 + point; 
      line(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius*cos(radians(angle2)), radius*sin(radians(angle2)));
       angle1 += point;
   }
   point = point*2;
}
 
  popMatrix();


/*
  pushMatrix();
  translate(width*.25, height*.75);

  for (k = 0; k < 2; k++) { 
    noFill();
    angle1 = k+180;
    arc(radius*cos(radians(angle1)), radius*sin(radians(angle1)), radius/2, radius/2, -PI, 0);
  }

  popMatrix();


pushMatrix();
   translate(3000, 3000);
   for (y = 0; y < 360/36; y++){ 
   for (k = 0; k < 360/36; k++){ 
   angle1 = k*36;
   angle2 = 360-k;
   line(700*cos(radians(angle1)),700*sin(radians(angle1)), 700*cos(radians(angle2)), 700*sin(radians(angle2)));
   }
   }
   popMatrix();
   pushMatrix();
   translate(3000, 1000);
   for (k = 0; k < 360; k++){ 
   angle1 = k;
   angle2 = k + 60;
   line(700*cos(angle1),700*sin(angle1), 700*cos(angle2), 700*sin(angle2));
   }
   popMatrix();
   
   //Makes circles accident
   for (k = 0; k < 360; k++){ 
   angle1 = k+1;
   angle2 = 360 - angle1;
   line(700*cos(angle1),700*sin(angle1), 700*cos(angle2), 700*sin(angle2));
   }*/



  save("circles.png");

  print("done");
}

以上是关于text 4 circles.pde的主要内容,如果未能解决你的问题,请参考以下文章

text 与circles.pde有关

text 芝加哥代码2018年4月4日更新

text 交叉编译OpenCV3.4

text 快递4放

text psr-4片段

text Bootstrap 4搜索演示