Daily Creative Coding

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

並んだドット

/** * dots * * @author aa_debdeb * @date 2016/05/06 */ float hStep = 25; float wStep = 10; float diameter = 7; float hueStep = 0.3; float hue; void setup(){ size(600, 400); ellipseMode(CENTER); noStroke(); colorMode(HSB, 360, 100, 100); hu…

色相 ± 60°

/** * hue +- 60 * * @author aa_debdeb * @date 2016/04/04 */ color c0, c1, c2, cbg; ArrayList<Ball> balls; void setup(){ size(640, 640); colorMode(HSB, 360, 100, 100); noStroke(); mousePressed(); balls = new ArrayList<Ball>(); } void mousePressed(){ cb</ball></ball>…

同じ色相でブロックを再帰的に分割する

/** * same hue * * @author aa_debdeb * @date 2016/04/03 */ void setup(){ size(640, 480); noStroke(); colorMode(HSB, 360, 100, 100); mousePressed(); } void draw(){ } void mousePressed(){ float hue = random(360); ArrayList<Block> queue = new ArrayL</block>…

彩度と明度

/** * brightness & saturation * * @author aa_debdeb * @date 2016/03/31 */ float step = 2; void setup(){ size(500, 500); colorMode(HSB, 360, 100, 100); noStroke(); } void draw(){ float rad = atan2(mouseY - height / 2, mouseX - width / 2); f…

補色

/** * complementary color * * @author aa_debdeb * @date 2016/03/30 * */ ArrayList<PVector> ps1; ArrayList<PVector> ps2; color bgc, pc1, pc2; void setup(){ size(640, 480); noStroke(); colorMode(HSB, 360, 100, 100); ps1 = new ArrayList<PVector>(); for(int i = 0; i < 7</pvector></pvector></pvector>…

HSB色空間

/** * HSB * * @author aa_debdeb * @date 2016/03/29 */ float angStep = 1.0; void setup(){ size(500, 500); noStroke(); colorMode(HSB, 360, 100, 100); } void draw(){ translate(width / 2, height / 2); for(float ang = 0; ang < 360; ang += angSt…

カラーパレット

/** * color mosaic * * @author aa_debdeb * @date 2016/03/28 */ void setup(){ size(500, 500); noStroke(); mousePressed(); } void draw(){ } void mousePressed(){ float hcenter, hwidth, smin, smax, bmin, bmax; hcenter = random(360); hwidth = r…