2018-02-13から1日間の記事一覧

【Processing】四角形でフラクタル

void setup(){ size(500,500); background(255); } void draw(){ background(255); noStroke(); drawRect(0,0,width); } void drawRect(float x,float y, float hi){ float wi = hi; fill(map(hi,width,0,230,0)); rect(x,y,wi,hi); if(hi>1){ translate(x,h…

【Processing】copy()を使ってみる(3)

#Processing pic.twitter.com/rfOP7UqQSn — 94 (@_94_94) 2018年2月12日 PImage img; //画像のオブジェクトを宣言 float a = 0.001; int y = 0 ; //ペースト位置y int y2; //ペースト位置y int area = 100; int start = -area; void setup(){ img = loadImag…