SlideShare a Scribd company logo
1 of 28
Download to read offline
y




        x

z
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;
}
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;
}
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;
}
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));
	   }
}
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;
	   	     }
	   }
}
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);
	   }
}
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;
	   	     }
	   }
}
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();
}
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();
	 }
}
Proga 0601
Proga 0601

More Related Content

What's hot

Wap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmWap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmKapil Pandit
 
Know more processing
Know more processingKnow more processing
Know more processingYukiAizawa1
 
R scatter plots
R scatter plotsR scatter plots
R scatter plotsAbhik Seal
 
Tools for research plotting
Tools for research plottingTools for research plotting
Tools for research plottingNimrita Koul
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++Ankit Kumar
 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in cHapPy SumOn
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicalsManoj Chauhan
 
analog clock C#
analog clock C#analog clock C#
analog clock C#omeed
 
Paperjs presentation
Paperjs presentationPaperjs presentation
Paperjs presentationsharp-blade
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
PYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERSPYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERSJEETPRATAPSINGH
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 

What's hot (17)

Wap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmWap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithm
 
Know more processing
Know more processingKnow more processing
Know more processing
 
7. chapter vi
7. chapter vi7. chapter vi
7. chapter vi
 
R scatter plots
R scatter plotsR scatter plots
R scatter plots
 
Oprerator overloading
Oprerator overloadingOprerator overloading
Oprerator overloading
 
Tools for research plotting
Tools for research plottingTools for research plotting
Tools for research plotting
 
Caropro
CaroproCaropro
Caropro
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++
 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in c
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicals
 
analog clock C#
analog clock C#analog clock C#
analog clock C#
 
Paperjs presentation
Paperjs presentationPaperjs presentation
Paperjs presentation
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
PYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERSPYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERS
 
Vcs9
Vcs9Vcs9
Vcs9
 
Experement no 6
Experement no 6Experement no 6
Experement no 6
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 

Viewers also liked (7)

Sbaw090623
Sbaw090623Sbaw090623
Sbaw090623
 
Tau Web0609
Tau Web0609Tau Web0609
Tau Web0609
 
Proga 0622
Proga 0622Proga 0622
Proga 0622
 
Web Presen1 0625
Web Presen1 0625Web Presen1 0625
Web Presen1 0625
 
Proga 0615
Proga 0615Proga 0615
Proga 0615
 
Web Presen1 0709
Web Presen1 0709Web Presen1 0709
Web Presen1 0709
 
Meteor.js for DOers
Meteor.js for DOersMeteor.js for DOers
Meteor.js for DOers
 

Similar to Proga 0601

[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노Chiwon Song
 
Creating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfCreating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfShaiAlmog1
 
Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision DetectionJenchoke Tachagomain
 
[SI] Ada Lovelace Day 2014 - Tampon Run
[SI] Ada Lovelace Day 2014  - Tampon Run[SI] Ada Lovelace Day 2014  - Tampon Run
[SI] Ada Lovelace Day 2014 - Tampon RunMaja Kraljič
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2MEJenchoke Tachagomain
 
Creating an Uber Clone - Part IV.pdf
Creating an Uber Clone - Part IV.pdfCreating an Uber Clone - Part IV.pdf
Creating an Uber Clone - Part IV.pdfShaiAlmog1
 
[EN] Ada Lovelace Day 2014 - Tampon run
[EN] Ada Lovelace Day 2014  - Tampon run[EN] Ada Lovelace Day 2014  - Tampon run
[EN] Ada Lovelace Day 2014 - Tampon runMaja Kraljič
 
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdf
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdfbfd23fd7-0d89-45c0-8b82-c991b30ed375.pdf
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdfshehabhamad_90
 
Introduction to Computer Graphics using OpenGLCan someone tell me .pdf
Introduction to Computer Graphics using OpenGLCan someone tell me .pdfIntroduction to Computer Graphics using OpenGLCan someone tell me .pdf
Introduction to Computer Graphics using OpenGLCan someone tell me .pdffathimafancyjeweller
 
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docx
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docxNewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docx
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docxcurwenmichaela
 
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdfaquacosmossystems
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 

Similar to Proga 0601 (20)

Kwp2 100121
Kwp2 100121Kwp2 100121
Kwp2 100121
 
Kwp2 100121
Kwp2 100121Kwp2 100121
Kwp2 100121
 
Proga 0706
Proga 0706Proga 0706
Proga 0706
 
[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노
 
Kwp2 100114
Kwp2 100114Kwp2 100114
Kwp2 100114
 
Include
IncludeInclude
Include
 
Creating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfCreating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdf
 
graphics Assidnment
graphics Assidnmentgraphics Assidnment
graphics Assidnment
 
Proga 0629
Proga 0629Proga 0629
Proga 0629
 
Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
 
[SI] Ada Lovelace Day 2014 - Tampon Run
[SI] Ada Lovelace Day 2014  - Tampon Run[SI] Ada Lovelace Day 2014  - Tampon Run
[SI] Ada Lovelace Day 2014 - Tampon Run
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
Graphical representation of Stack
Graphical representation of StackGraphical representation of Stack
Graphical representation of Stack
 
Creating an Uber Clone - Part IV.pdf
Creating an Uber Clone - Part IV.pdfCreating an Uber Clone - Part IV.pdf
Creating an Uber Clone - Part IV.pdf
 
[EN] Ada Lovelace Day 2014 - Tampon run
[EN] Ada Lovelace Day 2014  - Tampon run[EN] Ada Lovelace Day 2014  - Tampon run
[EN] Ada Lovelace Day 2014 - Tampon run
 
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdf
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdfbfd23fd7-0d89-45c0-8b82-c991b30ed375.pdf
bfd23fd7-0d89-45c0-8b82-c991b30ed375.pdf
 
Introduction to Computer Graphics using OpenGLCan someone tell me .pdf
Introduction to Computer Graphics using OpenGLCan someone tell me .pdfIntroduction to Computer Graphics using OpenGLCan someone tell me .pdf
Introduction to Computer Graphics using OpenGLCan someone tell me .pdf
 
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docx
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docxNewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docx
NewTetrisScore.cppNewTetrisScore.cpp newTetris.cpp  Defines t.docx
 
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 

More from Atsushi Tadokoro

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望Atsushi Tadokoro
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようAtsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Atsushi Tadokoro
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2Atsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Atsushi Tadokoro
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションAtsushi Tadokoro
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Atsushi Tadokoro
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Atsushi Tadokoro
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くAtsushi Tadokoro
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリAtsushi Tadokoro
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使うAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Atsushi Tadokoro
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得Atsushi Tadokoro
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Atsushi Tadokoro
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するAtsushi Tadokoro
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えAtsushi Tadokoro
 

More from Atsushi Tadokoro (20)

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II Processingによるアニメーション
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
 
Tamabi media131118
Tamabi media131118Tamabi media131118
Tamabi media131118
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
 

Proga 0601

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. y x z
  • 6.
  • 7. 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; }
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. 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; }
  • 13.
  • 14. 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; }
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. 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)); } }
  • 20. 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; } } }
  • 21.
  • 22. 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); } }
  • 23. 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; } } }
  • 24.
  • 25. 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(); }
  • 26. 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(); } }