Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
numbers[0]


                              numbers[1]


                              numbers[2]
int[] numbers = new int[5...
int BALL_NUM = 100;                           //
float[] x = new float[BALL_NUM];                   void draw(){
float[] y...
int BAR_NUM = 100;                                    rect(x[i],0,bWidth[i],height);
float[] x = new float[BAR_NUM];      ...
float x, y, cx, cy;                        ellipse(x, y, bSize, bSize);
float angle, radius, aSpeed, bSize;         }

// ...
int NUM = 32;                                           y[i] = cx + (radius * cos(radians(angle[i])));
float cx, cy, radiu...
int NUM = 256;                               x[i] = cx + (radius *
float cx, cy, radius, maxSpeed, maxSize;      sin(radia...
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Proga 0518
Upcoming SlideShare
Loading in …5
×

of

Proga 0518 Slide 1 Proga 0518 Slide 2 Proga 0518 Slide 3 Proga 0518 Slide 4 Proga 0518 Slide 5 Proga 0518 Slide 6 Proga 0518 Slide 7 Proga 0518 Slide 8 Proga 0518 Slide 9 Proga 0518 Slide 10 Proga 0518 Slide 11 Proga 0518 Slide 12 Proga 0518 Slide 13 Proga 0518 Slide 14 Proga 0518 Slide 15 Proga 0518 Slide 16 Proga 0518 Slide 17 Proga 0518 Slide 18 Proga 0518 Slide 19 Proga 0518 Slide 20 Proga 0518 Slide 21 Proga 0518 Slide 22 Proga 0518 Slide 23 Proga 0518 Slide 24 Proga 0518 Slide 25 Proga 0518 Slide 26
Upcoming SlideShare
Proga 0608
Next
Download to read offline and view in fullscreen.

1 Like

Share

Download to read offline

Proga 0518

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Proga 0518

  1. 1. numbers[0] numbers[1] numbers[2] int[] numbers = new int[5]; numbers[3] numbers[4] numbers[5]
  2. 2. int BALL_NUM = 100; // float[] x = new float[BALL_NUM]; void draw(){ float[] y = new float[BALL_NUM]; background(0,0,20); float[] xSpeed = new float[BALL_NUM]; for(int i=0; i<BALL_NUM; i++){ float[] ySpeed = new float[BALL_NUM]; fill(bColor[i]); float[] bSize = new float[BALL_NUM]; ellipse(x[i],y[i],bSize[i],bSize[i]); color[] bColor = new color[BALL_NUM]; x[i] += xSpeed[i]; y[i] += ySpeed[i]; // if(x[i] > width || x[i] < 0){ void setup(){ xSpeed[i] *= -1; size(480,480); } smooth(); if(y[i] > height || y[i] < 0){ frameRate(30); ySpeed[i] *= -1; colorMode(HSB,360,100,100,100); } 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); } }
  3. 3. 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]);
  4. 4. float x, y, cx, cy; ellipse(x, y, bSize, bSize); float angle, radius, aSpeed, bSize; } // // void setup(){ void drawFade(){ size(480,480); noStroke(); colorMode(HSB, 360,100,100,100); fill(0,0,0,5); background(0); rect(0,0,width,height); noFill(); } frameRate(30); smooth(); cx = width/2; cy = height/2; angle = 0; radius = 160; aSpeed = 2; bSize = 20; } // void draw(){ drawFade(); // x = cx + (radius * sin(radians(angle))); y = cx + (radius * cos(radians(angle))); angle += aSpeed; noFill(); stroke(240,100,100);
  5. 5. int NUM = 32; y[i] = cx + (radius * cos(radians(angle[i]))); float cx, cy, radius, maxSpeed, maxSize; angle[i] += thisSpeed; float[] x = new float[NUM]; noFill(); float[] y = new float[NUM]; stroke(240,100,100); float[] angle = new float[NUM]; ellipse(x[i], y[i], thisSize, thisSize); } void setup(){ } size(480,480); colorMode(HSB, 360,100,100,100); void drawFade(){ background(0); noStroke(); noFill(); fill(0,0,0,10); frameRate(30); rect(0,0,width,height); smooth(); } cx = width/2; cy = height/2; radius = 100; maxSpeed = 3; maxSize = 200; for(int i=0; i<NUM; i++){ angle[i] = 0; } } void draw(){ drawFade(); for(int i=0; i<NUM; i++){ float thisSpeed = (maxSpeed / NUM) * i; float thisSize = (maxSize / NUM) * i; x[i] = cx + (radius * sin(radians(angle[i])));
  6. 6. int NUM = 256; x[i] = cx + (radius * float cx, cy, radius, maxSpeed, maxSize; sin(radians(angle[i]))); float[] x = new float[NUM]; y[i] = cx + (radius * float[] y = new float[NUM]; cos(radians(angle[i]))); float[] angle = new float[NUM]; angle[i] += thisSpeed; noFill(); void setup(){ stroke(240,100,100,5); size(480,480); ellipse(x[i], y[i], thisSize, thisSize); colorMode(HSB, 360,100,100,100); } background(0); } noFill(); frameRate(30); void drawFade(){ smooth(); noStroke(); cx = width/2; fill(0,0,0,5); cy = height/2; rect(0,0,width,height); radius = 100; } maxSpeed = 1; maxSize = 200; for(int i=0; i<NUM; i++){ angle[i] = 0; } } void draw(){ drawFade(); for(int i=0; i<NUM; i++){ float thisSpeed = (maxSpeed / NUM) * i+ maxSpeed/5; float thisSize = (maxSize / NUM) * i;
  • m0Rya

    Sep. 30, 2014

Views

Total views

1,527

On Slideshare

0

From embeds

0

Number of embeds

229

Actions

Downloads

11

Shares

0

Comments

0

Likes

1

×