コード例 #1
0
 public void draw() {
   lights();
   background(255);
   noStroke();
   fill(200);
   translate(-width / 2, 0);
   t += 0.001f;
   int offset = 10;
   float shapeSize = 5.0f;
   for (int i = 1; i < 10; i++) {
     // ellipse(noise(t+i*offset*0.01)*width, sin(float(frameCount + i*offset)/100)*height/2,
     // shapeSize*i, shapeSize*i);
     float x = noise(t + i * offset * 0.01f) * width;
     float y = sin(PApplet.parseFloat(frameCount + i * offset) / 100) * height / 2;
     pushMatrix();
     translate(x, y);
     sphere(shapeSize * i);
     popMatrix();
   }
 }
コード例 #2
0
 public static void main(String args[]) {
   PApplet.main(
       new String[] {"--present", "--bgcolor=#666666", "--hide-stop", "basic_processing_sketch"});
 }