Proga 0601

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Proga 0601 - Presentation Transcript

    1. y x z
    2. float rot=0; void setup(){ size(400,400); colorMode(HSB,360,100,100,100); frameRate(30); smooth(); fill(200,100,100); stroke(0,0,100); rectMode(CENTER); } void draw(){ background(0,0,20); translate(width/2,height/2); rotate(rot); rect(0,0,200,200); rot += 0.1; }
    3. import processing.opengl.*; float rot=0; void setup(){ size(400,400,OPENGL); colorMode(HSB,360,100,100,100); frameRate(30); fill(200,100,100); stroke(0,0,100); rectMode(CENTER); } void draw(){ background(0,0,20); translate(width/2,height/2); rotateX(rot); rect(0,0,200,200); rot += 0.1; }
    4. import processing.opengl.*; float rotX=0, rotY=0, rotZ=0; void setup(){ size(400,400,OPENGL); colorMode(HSB,360,100,100,100); frameRate(30); fill(200,100,100); stroke(0,0,100); rectMode(CENTER); } void draw(){ background(0,0,20); translate(width/2,height/2); rotateX(rotX); rotateY(rotY); rotateZ(rotZ); rect(0,0,200,200); rotX += 0.1; rotY += 0.2; rotZ += 0.3; }
    5. import processing.opengl.*; int NUM = 5000; float[] x = new float[NUM]; float[] y = new float[NUM]; float[] z = new float[NUM]; color[] col = new color[NUM]; void setup(){ size(400,400,OPENGL); colorMode(HSB,360,100,100,100); frameRate(30); noFill(); stroke(200,100,100); smooth(); for(int i=0; i<NUM; i++){ x[i] = random(width); y[i] = random(height); z[i] = random(-5000,0); col[i] = color(random(200,240),random(50,100),random(100)); } }
    6. void draw(){ background(0); for(int i=0; i<NUM; i++){ stroke(color(col[i])); line(x[i],y[i],z[i],x[i],y[i],z[i]+100); z[i]+=20; if(z[i]>100){ z[i] -= 5000; } } }
    7. import processing.opengl.*; int NUM = 100; float[] x = new float[NUM]; float[] y = new float[NUM]; float[] z = new float[NUM]; float[] rot = new float[NUM]; float[] rSpeed = new float[NUM]; color[] col = new color[NUM]; void setup(){ size(400,400,OPENGL); colorMode(HSB,360,100,100,100); frameRate(30); noStroke(); smooth(); for(int i=0; i<NUM; i++){ x[i] = random(width); y[i] = random(height); z[i] = random(-5000,0); rot[i] = 0; rSpeed[i] = random(-0.1,0.1); col[i] = color(random(0,360),random(100),random(100),50); } }
    8. void draw(){ background(0); for(int i=0; i<NUM; i++){ fill(color(col[i])); pushMatrix(); translate(x[i],y[i],z[i]); rotateX(rot[i]); rotateY(rot[i]); rotateZ(rot[i]); box(30); popMatrix(); z[i]+=20; rot[i] += rSpeed[i]; if(z[i]>100){ z[i] -= 5000; } } }
    9. import processing.opengl.*; float a; int NUM = 128; float offset = PI/NUM; color[] colors = new color[NUM]; void setup() { size(400, 400, OPENGL); noStroke(); colorMode(HSB,360,100,100,100); frameRate(30); for(int i=0; i<NUM; i++) { colors[i] = color(i*2+100,70,100,25); } lights(); }
    10. void draw() { background(0); lights(); translate(width/2, height/2, -20); a+=0.01; for(int i=0; i<NUM; i++) { pushMatrix(); fill(colors[i]); rotateY(a+offset*i); rotateX(a/2+offset*i); rotateZ(a/3+offset*i); box(width/2); popMatrix(); } }

    + Atsushi TadokroAtsushi Tadokro, 8 months ago

    custom

    269 views, 0 favs, 2 embeds more stats

    More info about this presentation

    © All Rights Reserved

    • Total Views 269
      • 179 on SlideShare
      • 90 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 1
    Most viewed embeds
    • 76 views on http://yoppa.org
    • 14 views on http://yoppa.jpn.org

    more

    All embeds
    • 76 views on http://yoppa.org
    • 14 views on http://yoppa.jpn.org

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?