• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Proga 0518
 

Proga 0518

on

  • 1,617 views

 

Statistics

Views

Total Views
1,617
Views on SlideShare
1,399
Embed Views
218

Actions

Likes
0
Downloads
7
Comments
0

4 Embeds 218

http://yoppa.org 193
http://yoppa.jpn.org 21
http://www.slideshare.net 3
http://www.yoppa.org 1

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
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Proga 0518 Proga 0518 Presentation Transcript

  • 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]; 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); } }
  • 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]);
  • 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);
  • 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])));
  • 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;