Kwp2 091217
Upcoming SlideShare
Loading in...5
×
 

Kwp2 091217

on

  • 845 views

 

Statistics

Views

Total Views
845
Views on SlideShare
831
Embed Views
14

Actions

Likes
0
Downloads
6
Comments
0

3 Embeds 14

http://yoppa.org 7
http://yoppa.jpn.org 5
http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Kwp2 091217 Kwp2 091217 Presentation Transcript

  • float x, y, xSpeed, ySpeed; // void setup(){ size(480,480); frameRate(30); colorMode(HSB,360,100,100,100); noStroke(); fill(180,100,80,80); x = random(width); y = random(height); xSpeed = random(-10,10); ySpeed = random(-10,10); } // void draw(){ background(0); ellipse(x,y,40,40); x += xSpeed; y += ySpeed; if(x > width || x < 0){ xSpeed *= -1; } if(y > height || y < 0){ ySpeed *= -1;
  • numbers[0] numbers[1] numbers[2] int[] numbers = new int[5]; numbers[3] numbers[4] numbers[5]
  • int BALL_NUM = 100; float[] x = new float[BALL_NUM]; // float[] y = new float[BALL_NUM]; void draw(){ float[] xSpeed = new float[BALL_NUM]; background(0,0,20); float[] ySpeed = new float[BALL_NUM]; for(int i=0; i<BALL_NUM; i++){ float[] bSize = new float[BALL_NUM]; fill(bColor[i]); color[] bColor = new color[BALL_NUM]; ellipse(x[i],y[i],bSize[i],bSize[i]); x[i] += xSpeed[i]; // y[i] += ySpeed[i]; void setup(){ if(x[i] > width || x[i] < 0){ size(480,480); xSpeed[i] *= -1; smooth(); } frameRate(30); if(y[i] > height || y[i] < 0){ colorMode(HSB,360,100,100,100); ySpeed[i] *= -1; noStroke(); } for(int i=0; i<BALL_NUM; i++){ } x[i] = random(width); } y[i] = random(height); xSpeed[i] = random(-10,10); ySpeed[i] = random(-10,10); bSize[i] = random(20,60); bColor[i] = color(random(200,240),random(80,100),random(80,1 00),70); } }
  • int BAR_NUM = 100; rect(x[i],0,bWidth[i],height); float[] x = new float[BAR_NUM]; x[i] += xSpeed[i]; float[] xSpeed = new float[BAR_NUM]; if(x[i] > width || x[i] < -bWidth[i]){ float[] bWidth = new float[BAR_NUM]; xSpeed[i] *= -1; color[] bColor = new color[BAR_NUM]; } } // } void setup(){ size(640,240); frameRate(30); smooth(); colorMode(HSB,360,100,100,100); noStroke(); for(int i=0; i<BAR_NUM; i++){ x[i] = random(width); xSpeed[i] = random(-1,1); bWidth[i] = random(2,200); bColor[i] = color(random(360),random(90,100),random(50,100), 20); } } // void draw(){ background(0); for(int i=0; i<BAR_NUM; i++){ fill(bColor[i]);