Daily Creative Coding

元「30 min. Processing」。毎日、Creative Codingします。

2015-11-01から1ヶ月間の記事一覧

擬似ヘックス

/** * Hex * * @autor aa_debdeb * @date 2015/11/30 */ Hex[][] hexs; void setup(){ size(500, 500); background(255); hexs = new Hex[21][21]; for(int x = 0; x <= 20; x++){ for(int y = 0; y <= 20; y++){ hexs[x][y] = new Hex(12.5); } } noStroke(…

三次元のボールが向かってくる

3D

/** * Coming Ball * * @author aa_debdeb * @date 2015/11/29 */ ArrayList<Ball> balls; void setup(){ size(500, 500, P3D); smooth(); frameRate(30); sphereDetail(16); background(0); balls = new ArrayList<Ball>(); } void draw(){ noStroke(); fill(0, 30); re</ball></ball>…

三次元の線を重ねる

3D

/** * 3D Lines * * @author aa_debdeb * @date 2015/11/28 */ float gray; float radious; float theta1; float theta2; int grayStep; float radiousNoise; float theta1Noise; float theta2Noise; void setup(){ size(500, 500, P3D); background(255); s…

三次元のホワイトノイズ

3D

/** * 3D White Noise * * @author aa_debdeb * @date 2015/11/27 */ void setup(){ size(500, 500, P3D); smooth(); frameRate(30); } void draw(){ background(255); stroke(0); strokeWeight(1); fill(128, 128); lights(); rotateX(-PI / 4); rotateY(-P…

マウスの近くの球が近づく

/** * Pop Up Surface * * @author aa_debdeb * @date 2015/11/26 */ void setup(){ size(500, 500, P3D); smooth(); sphereDetail(10); } void draw(){ background(0); noStroke(); fill(255); lights(); for(int x = -100; x < width + 100; x += 20){ for…

三次元の表面を波立たせる

3D

/** * Waving Surface * * @author aa_debdeb * @date 2015/11/25 */ void setup(){ size(500, 500, P3D); smooth(); sphereDetail(5); } void draw(){ background(0); noStroke(); lights(); fill(0, 128, 128); for(int x = 0; x <= width; x += 20){ for(…

カメラ画像を三次元の色付きボックスで表現する.

飛び出る3Dみたい. /** * Color Box Image * * @author aa_debdeb * @date 2015/11/24 * */ import processing.video.*; Capture camera; void setup(){ size(640, 480, P3D); smooth(); camera = new Capture(this, width, height); camera.start(); } voi…

カメラ画像を三次元のボックスで表現する

/** * Box Image * * @author aa_debdeb * @date 2015/11/23 * */ import processing.video.*; Capture camera; void setup(){ size(640, 480, P3D); smooth(); camera = new Capture(this, width, height); camera.start(); } void draw(){ background(255)…

音量を色で可視化する

/** * Sound Volume Meter * * @author aa_debdeb * @date 2015/11/22 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim minim; Au…

カラースペクトログラム

/** * Color Spectrogram * * @author aa_debdeb * @date 2015/11/21 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim minim; Aud…

渦を描く

/** * Looper * * @author aa_debdeb * @date 2015/11/20 */ void setup(){ size(500, 500); background(255); } void draw(){ background(255); noStroke(); fill(0); translate(width/2, height/2); rotate(frameCount * 0.01); for(float angle = 0;angle …

レーザービーム

/** * Laser Beam * * @author aa_debdeb * @date 2015/11/19 */ float[] startXs; float[] startYs; void setup(){ size(500, 500); smooth(); frameRate(45); startXs = new float[4]; startYs = new float[4]; for(int i = 0; i < 4; i++){ startXs[i] = …

花びら

/** * Petals * * @author aa_debdeb * @date 2015/11/18 */ ArrayList<Flow> flows; void setup(){ size(500, 500); smooth(); frameRate(60); background(255, 240, 245); flows = new ArrayList<Flow>(); } void draw(){ noStroke(); fill(255, 240, 245, 10); rect(-</flow></flow>…

多色のグラデーション

/** * Gradation of Multiple Colors * * @author aa_debdeb * @date 2015/11/17 */ color[] colors = { color(0, 0, 255), // blue color(0, 255, 255), // aqua color(0, 255, 0), // green color(255, 255, 0), // yellow color(255, 165, 0), // orange …

スペクトログラム

/** * Spectrogram * * @author aa_debdeb * @date 2015/11/16 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim minim; AudioInpu…

マイク入力の音の大きさに応じて波紋をつくる

/** * Ripple By Sound * * @author aa_debdeb * @date 2015/11/15 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Minim minim; Audio…

キーボードから入力した文字を電光掲示板風に表示する

/** * Display of Character Like Electronic Signboard * * @author aa_debdeb * @date 2015/11/14 */ void setup(){ size(500, 500); smooth(); background(0); textSize(400); textAlign(CENTER); } void draw(){ } void keyPressed(){ background(0); fi…

キーボードから入力した文字を表示する

/** * Display of Character from Keyboard * * @author aa_debdeb * @date 2015/11/13 */ void setup(){ size(500, 500); smooth(); background(0); fill(255); textSize(400); textAlign(CENTER); } void draw(){ } void keyPressed(){ background(0); cha…

マウスを避けるドット

/** * Untouchable Dots * * @author aa_debdeb * @date 2015/11/12 */ void setup(){ size(500, 500); smooth(); frameRate(30); } void draw(){ background(255); noStroke(); fill(0); for(int x = 0; x < 50; x++){ for(int y = 0; y < 50; y++){ PVecto…

点線で円を描く

/** * Sphere * * @author aa_debdeb * @date 2015/11/11 */ void setup(){ size(500, 500); background(0); } void draw(){ stroke(255); translate(width/2, height/2); float radious = 200 * sin(frameCount * (TWO_PI / 169.0)); point(radious * cos(f…

ベジエ曲線で水玉を描く

/** * Drops * * @author aa_debdeb * @date 2015/11/10 */ Drop[][] drops; void setup(){ size(500, 500); smooth(); drops = new Drop[10][10]; for(int x = 0; x < 10; x++){ for(int y = 0; y < 10; y++){ drops[x][y] = new Drop((x + 1) * 45.5, (y +…

映像のRGBの各層をずらす

/** * Video with Shifted RGB Layers * * @author aa_debdeb * @date 2015/11/09 */ import processing.video.*; Capture camera; PVector rDiff = new PVector(-50, -50); PVector gDiff = new PVector(50, -50); PVector bDiff = new PVector(0, 100); vo…

カメラ映像に残像を入れる

/** * Slow Shutter Video * * @author aa_debdeb * @date 2015/11/08 */ import processing.video.*; Capture camera; color[][] previousPixels; int frames = 20; void setup(){ size(640, 480); camera = new Capture(this, width, height); camera.star…

カメラの基礎1

Webカメラの映像を表示する /** * Video * * @author aa_debdeb * @date 2015/11/07 */ import processing.video.*; Capture camera; void setup(){ size(640, 480); camera = new Capture(this, width, height); camera.start(); } void draw(){ image(came…

周辺光量落ち

/** * Decrease in the peripheral light quantity * * @author aa_debdeb * @date 2015/11/06 */ void setup(){ size(640, 424); PImage image = loadImage("image.jpg"); image(image, 0, 0); noFill(); stroke(0); strokeWeight(1); for(int i = 0; i < 4…

インタラクティブに音を合成する

マウスをクリックすると,1つのサイン波を生成する. x方向は音の高さ,y方向は音の大きさに対応している. 生成したサイン波はドラッグで移動させることができる. /** * Interactive Sound Synthesis * * @author aa_debdeb * @date 2015/11/05 */ import…

minimでドレミを鳴らす

左からドレミファソラシドに対応している. /** * Octave * * @author aa_debdeb * @date 2015/10/04 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.min…

音の周波数を円の色で可視化する

/** * Visualization of Sound Frequency by Circles * * @author aa_debdeb * @date 2015/11/03 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.e…

マイク入力の音の大きさに応じて円の大きさを変える

/** * Circles responding Sound Level * * @author aa_debdeb * @date 2015/11/02 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Min…

minimで色々な波形の音を出す

サイン波 /** * Sound of Square Wave * * @author aa_debdeb * @date 2015/11/01 */ import ddf.minim.spi.*; import ddf.minim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; Mini…