O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Proga 0518
Proga 0518
Carregando em…3
×

Confira estes a seguir

1 de 28 Anúncio
Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (19)

Semelhante a Proga 090525 (20)

Anúncio

Mais de Atsushi Tadokoro (20)

Proga 090525

  1. 1. // float mx; float my; float delay = 10.0; void setup() { size(400,400); colorMode(HSB,360,100,100,100); smooth(); fill(200,100,100,100); noStroke(); } void draw() { background(0,0,25); ellipse(mouseX, mouseY, 40, 40); }
  2. 2. // float mx; float my; float delay = 10.0; void setup() { size(400,400); colorMode(HSB,360,100,100,100); smooth(); noStroke(); } void draw() { background(0,0,25); float dx = mouseX - mx; if(abs(dx) > 1) { mx = mx + dx/delay; } float dy = mouseY - my; if(abs(dy) > 1) { my = my + dy/delay; } fill(200,80,80); ellipse(mx, my, 40, 40); }
  3. 3. // int LENGTH = 30; int[] x = new int[LENGTH]; int[] y = new int[LENGTH]; void setup(){ size(400,400); colorMode(HSB,360,100,100,100); frameRate(30); smooth(); stroke(200,100,100); noFill(); } void draw(){ background(0); for(int i=1; i<LENGTH; i++){ x[LENGTH-i] = x[LENGTH-i-1]; y[LENGTH-i] = y[LENGTH-i-1]; } x[0] = mouseX; y[0] = mouseY; ellipse(x[LENGTH-1],y[LENGTH-1],40,40); }
  4. 4. // y[LENGTH-i] = y[LENGTH- int NUM = 12; i-1]; int DELAY = 10; } int LENGTH = NUM*DELAY; x[0] = mouseX; int MAX_SIZE = 600; y[0] = mouseY; int[] x = new int[LENGTH]; for(int i=1; i<NUM; i++){ int[] y = new int[LENGTH]; ellipse(x[i*DELAY], y[i*DELAY], void setup(){ dSize*i, size(400,400); dSize*i); colorMode(HSB,360,100,100,100); } frameRate(30); } smooth(); stroke(200,100,100,100); noFill(); } void draw(){ background(0); float dSize = MAX_SIZE / NUM; for(int i=1; i<LENGTH; i++){ x[LENGTH-i] = x[LENGTH- i-1];
  5. 5. // void setup(){ size(400,400); colorMode(HSB,360,100,100,100); frameRate(30); smooth(); noFill(); stroke(200,100,100); } void draw(){ background(0,0,25); float x = width/2; float y = height/2; translate(x,y); rotate(atan2(mouseY-y,mouseX-x)); line(-10,0,10,0); ellipse(14,0,8,8); }
  6. 6. // ( ) line(-5,0,5,0); int NUM = 400; ellipse(7,0,4,4); float[] x = new float[NUM]; popMatrix(); float[] y = new float[NUM]; } } // void setup(){ size(400,400); colorMode(HSB,360,100,100,100); frameRate(30); smooth(); noFill(); stroke(200,100,100); for(int i=0; i<NUM; i++){ x[i] = random(width); y[i] = random(height); } } void draw(){ background(0); for(int i=0; i<NUM; i++){ pushMatrix(); translate(x[i],y[i]); rotate(atan2(mouseY-y[i], mouseX-x[i]));
  7. 7. // pushMatrix(); translate(width/2, height/2); rotate(angle); float aSpeed, angle; drawGrid(); boolean pressed; popMatrix(); // angle += aSpeed; void setup(){ if(pressed){ size(400,400); aSpeed += 0.001; colorMode(HSB,360,100,100,100); } rectMode(CENTER); else if(aSpeed>0) { frameRate(30); aSpeed -= 0.01; smooth(); } else { noFill(); aSpeed = 0; noStroke(); } aSpeed = 0; } angle = 0; pressed = false; } // void draw(){ background(0,0,25);
  8. 8. // void mousePressed(){ pressed = true; } // void mouseReleased(){ pressed = false; } // void drawGrid(){ fill(0,0,100); rect(-200,-200,400,400); rect(200,200,400,400); fill(0,0,0); rect(-200,200,400,400); rect(200,-200,400,400); }

Notas do Editor





























×