Daily Creative Coding

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

2017-02-01から1ヶ月間の記事一覧

filter(BLUR)で霞んでいく線

/** * blurred line * * @author aadebdeb * @date 2017/02/28 */ var c1, c2, cl, clv; var tx, ty, vx, vy; function setup() { createCanvas(300, 300); frameRate(3); strokeWeight(1); initialize(); } function mousePressed() { initialize(); } func…

filter(ERODE)で削られていくリング

/** * eroded ring * * @author aadebdeb * @date 2017/02/27 */ var particles; function setup() { createCanvas(500, 300); frameRate(3); particles = []; for (var i = 0; i < 1000; i++) { particles.push(new Particle()); } background(0); noStroke…

filter(DILATE)でオブジェクトを徐々に小さくする

/** * dilating background * * @author aadebdeb * @date 2017/02/26 */ function setup() { createCanvas(500, 500); colorMode(HSB, 360, 100, 100); background(0, 0, 100); } function draw() { noStroke(); if (random(1) < 0.8) { fill(random(360), …

線の帯

/** * line belts * * @author aadebdeb * @date 2017/02/25 */ var posW = 0; var posH = 0; var posVW; var posVH; var posAW; var posAH; var numY = 50; var intervalH; var posAWOffset, posAHOffset; var stColor; function setup() { createCanvas(wi…

光の束

/** * fiber lights * * @author aadebdeb * @date 2017/02/24 */ function setup() { createCanvas(windowWidth, windowHeight); colorMode(HSB, 360, 100, 100, 255); frameRate(10); background(0, 100, 0); } function draw() { blendMode(BLEND); fill(…

円形に切り取られた空

/** * sky ball * * @author aadebdeb * @date 2017/02/23 */ var canvas; function setup() { canvas = createCanvas(500, 500); } function draw() { background(255); noStroke(); fill(0, 130, 200); ellipse(width / 2, height / 2, width, height); va…

shearXで歪められた市松模様

/** * sheared squares * * @author aadebdeb * @date 2017/02/22 */ var speed; function setup() { createCanvas(windowWidth, windowHeight); frameRate(15); rectMode(CENTER); speed = 0; } function draw() { var pspeed = speed; speed = mouseX - pm…

二点透視図法

/** * two-point perspective * * @author aadebdeb * @date 2017/02/21 */ function setup() { createCanvas(windowWidth, windowHeight); background(255); stroke(200); strokeWeight(1); frameRate(1); } function draw() { var w = random(width / 8, w…

重なる円と四角

/** * overlayed circles and triangles * * @author aadebdeb * @date 2017/02/20 */ var bgColor; var circleColor; var triangleColor; function setup() { createCanvas(windowWidth, windowHeight); colorMode(HSB, 360, 100, 100); frameRate(30); noS…

重なるCMYの円

/** * interlapping CMY circles * * @author aadebdeb * @date 2017/02/19 */ var colors; var isDarkest = true; function setup() { createCanvas(windowWidth, windowHeight); frameRate(30); noStroke(); colors = [ color(255, 255, 0), color(255, 0,…

瞬く三角形の光

/** * fragile triangles * * @author aadebdeb * @date 2017/02/18 */ var particles; var fillColors; var nOffsetX, nOffsetY, nOffsetSize; var nScale = 0.001; function setup() { createCanvas(windowWidth, windowHeight); nOffsetX = createVector(…

三角形の鳥群

/** * triangle birds * * @author aadebdeb * @date 2017/02/17 */ var particles; var fillColors; function setup() { createCanvas(windowWidth, windowHeight); fillColors = [ color(113, 199, 209), color(212, 211, 202), color(230, 26, 105) ]; fr…

三角形でマスキングテープ風スケッチ

/** * triangle tapes * * @author aadebdeb * @date 2017/02/16 */ var particles; var bgColor; var fillColors; function setup() { createCanvas(windowWidth, windowHeight); frameRate(10); bgColor = color(254, 247, 242); fillColors = [ color(240…

広がる縞々の円

/** * expanding circular stripes * * @author aadebdeb * @date 2017/02/15 */ var circles = []; var isWhite = true; function setup() { createCanvas(windowWidth, windowHeight); frameRate(10); noStroke(); } function draw() { background(255); v…

blendMode(DIFFERENCE)で干渉する縞

/** * interference disc * * @author aadebdeb * @date 2017/02/14 */ function setup() { createCanvas(windowWidth, windowHeight); mousePressed(); } function mousePressed() { blendMode(BLEND); background(random(255), random(255), random(255));…

テクノ・ライト

/** * techno lights * * @author aadebdeb * @date 2017/02/13 */ function setup() { createCanvas(windowWidth, windowHeight); colorMode(HSB, 360, 100, 100) frameRate(30); noFill(); } function draw() { background(0, 100, 0); strokeWeight(1); v…

ひだひだのリング

/** * frilly ring * * @author aadebdeb * @date 2017/02/12 */ var isWire = false; var nScale = 0.003; var nOffset1; var nOffset2; function mousePressed() { isWire = !isWire; } function setup() { createCanvas(windowWidth, windowHeight); fram…

波打つ花

/** * wavy flower * * @author aadebdeb * @date 2017/02/11 */ function setup() { createCanvas(windowWidth, windowHeight); frameRate(30); } function draw() { background(25, 37, 72); stroke(160, 138, 35); fill(160, 138, 35); translate(width /…

低解像度ディスプレイ上のオブジェクト

/** * rect flows in display * * @author aadebdeb * @date 2017/02/10 */ var particles; function setup() { createCanvas(windowWidth, windowHeight); frameRate(8); background(0); noStroke(); particles = []; for (var i = 0; i < 30; i++) { parti…

動く点でドロネー三角形分割

/* * moving triangles * * @author aadebdeb * @date 2017/02/09 */ var MARGIN = 200; var vertices; var hueVal; function setup() { createCanvas(windowWidth, windowHeight); frameRate(20); colorMode(HSB, 360, 100, 100); hueVal = random(50); ver…

p5.jsでドロネー三角形分割

/* * delaunay triangulation * * @author aadebdeb * @date 2017/02/08 */ var delaunayTriangulation; var hue; function setup() { createCanvas(windowWidth, windowHeight); colorMode(HSB, 360, 100, 100); hue = random(360); delaunayTriangulation …

ベジエ曲線で雫の形をつくる

/* * bezier drops * * @author aadebdeb * @date 2017/02/07 */ var rgb; var type = 0; function setup() { createCanvas(windowWidth, windowHeight); frameRate(30); noStroke(); rgb = [ color(255, 0, 0), color(0, 255, 0), color(0, 0, 255) ]; } fu…

createGraphics()でグリッチっぽくする

/* * chaotic replications * * @author aadebdeb * @date 2017/02/06 */ var canvas; function setup() { canvas = createCanvas(windowWidth, windowHeight); frameRate(30); colorMode(HSB, 360, 100, 100); noStroke(); background(0, 0, 100); } functi…

p5.jsのbeginContour(), endContour()を使う

/* * contours objects * * @author aadebdeb * @date 2017/02/05 */ var objs = []; var type = 0; var bgColor, fillColor; function setup() { createCanvas(windowWidth, windowHeight); for(var i = 0; i < 100; i++) { objs.push(new Obj(i)); } bgCol…

ねじれたライン

/* * twisted lines * * @author aadebdeb * @date 2017/02/04 */ var colors; var type; function setup() { createCanvas(windowWidth, windowHeight); colors = [ color(255, 0, 0), color(0, 255, 0), color(0, 0, 255) ]; type = 0; } function draw() …

p5.jsの3D基本図形

/* * 3D primitives * * @author aadebdeb * @date 2017/02/03 */ var X_SPACE = 200; var Y_SPACE = 250; var X_NUM = 4; var Y_NUM = 2; function setup() { createCanvas(800, 600, WEBGL); } function draw() { background(255); push(); translateTo(0,…

p5.jsでリズムマシン

/* * rhythm machine * * @author aadebdeb * @date 2017/02/02 */ var pattern = [ true, false, false, false, true, false, false, false, true, false, false, false, true, false, false, false ]; var noiseOsc, env; var part, pharse; var beat = 0;…

ランダムに揺れる画面とサウンド

/* * noisy screen & sound * * @author aadebdeb * @date 2017/02/01 */ var rects; var rgb; var osc, lpf; function setup() { createCanvas(windowWidth, windowHeight); rectMode(CENTER); rects = []; for (var i = 0; i < 50; i++) { rects.push(new …