SlideShare ist ein Scribd-Unternehmen logo
1 von 28
//
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);
}
//
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);
}
//
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);
}
//                              	 	    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];
//
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);
}
//                (          )       	   	   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]));
//                             	   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);
//
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);
}
Proga 090525

Weitere ähnliche Inhalte

Was ist angesagt?

Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노Chiwon Song
 
Creative Coding 1 - 1 Introduction
Creative Coding 1 - 1 IntroductionCreative Coding 1 - 1 Introduction
Creative Coding 1 - 1 IntroductionTill Nagel
 
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
 
Introduction to Processing and creative coding
Introduction to Processing and creative codingIntroduction to Processing and creative coding
Introduction to Processing and creative codingJerome Herr
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingGilbert Guerrero
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysGilbert Guerrero
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graphkinan keshkeh
 
Simulate bouncing ball in pygame
Simulate bouncing ball in pygameSimulate bouncing ball in pygame
Simulate bouncing ball in pygameDr Anurekha R
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changeshayato
 
Plot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onDr. Volkan OBAN
 
Simulate elliptical orbit in pygame
Simulate elliptical orbit in pygameSimulate elliptical orbit in pygame
Simulate elliptical orbit in pygameDr Anurekha R
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 

Was ist angesagt? (18)

Include
IncludeInclude
Include
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노
 
Creative Coding 1 - 1 Introduction
Creative Coding 1 - 1 IntroductionCreative Coding 1 - 1 Introduction
Creative Coding 1 - 1 Introduction
 
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
 
Kwp2 100107
Kwp2 100107Kwp2 100107
Kwp2 100107
 
Introduction to Processing and creative coding
Introduction to Processing and creative codingIntroduction to Processing and creative coding
Introduction to Processing and creative coding
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: Processing
 
Proga 0629
Proga 0629Proga 0629
Proga 0629
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + Arrays
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph
 
Simulate bouncing ball in pygame
Simulate bouncing ball in pygameSimulate bouncing ball in pygame
Simulate bouncing ball in pygame
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
 
Plot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,on
 
Canvas
CanvasCanvas
Canvas
 
Simulate elliptical orbit in pygame
Simulate elliptical orbit in pygameSimulate elliptical orbit in pygame
Simulate elliptical orbit in pygame
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Joclad 2010 d
Joclad 2010 dJoclad 2010 d
Joclad 2010 d
 

Ähnlich wie Proga 090525

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
 
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
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2MEJenchoke 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č
 
ARTDM 170, Week10: Arrays + Using Randomization
ARTDM 170, Week10: Arrays + Using RandomizationARTDM 170, Week10: Arrays + Using Randomization
ARTDM 170, Week10: Arrays + Using RandomizationGilbert Guerrero
 
Artdm170 Week10 Arrays Math
Artdm170 Week10 Arrays MathArtdm170 Week10 Arrays Math
Artdm170 Week10 Arrays MathGilbert Guerrero
 
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
 
Making Games in JavaScript
Making Games in JavaScriptMaking Games in JavaScript
Making Games in JavaScriptSam Cartwright
 
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č
 
Processing iii
Processing iiiProcessing iii
Processing iiicitylore
 
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
 

Ähnlich wie Proga 090525 (20)

Kwp2 100121
Kwp2 100121Kwp2 100121
Kwp2 100121
 
Proga 0608
Proga 0608Proga 0608
Proga 0608
 
Proga 0622
Proga 0622Proga 0622
Proga 0622
 
Ssaw08 0624
Ssaw08 0624Ssaw08 0624
Ssaw08 0624
 
graphics Assidnment
graphics Assidnmentgraphics Assidnment
graphics Assidnment
 
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
 
Graphical representation of Stack
Graphical representation of StackGraphical representation of Stack
Graphical representation of Stack
 
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
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
Sbaw090623
Sbaw090623Sbaw090623
Sbaw090623
 
ES6(ES2015) is beautiful
ES6(ES2015) is beautifulES6(ES2015) is beautiful
ES6(ES2015) is beautiful
 
[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
 
ARTDM 170, Week10: Arrays + Using Randomization
ARTDM 170, Week10: Arrays + Using RandomizationARTDM 170, Week10: Arrays + Using Randomization
ARTDM 170, Week10: Arrays + Using Randomization
 
Artdm170 Week10 Arrays Math
Artdm170 Week10 Arrays MathArtdm170 Week10 Arrays Math
Artdm170 Week10 Arrays Math
 
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
 
Making Games in JavaScript
Making Games in JavaScriptMaking Games in JavaScript
Making Games in JavaScript
 
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
 
Processing iii
Processing iiiProcessing iii
Processing iii
 
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
 

Mehr von 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
 

Mehr von 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 090525

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

Hinweis der Redaktion