↑イメージ画像
rainbow_note.pdf
↑★★★ダウンロード用URL★★★
↓Processing code.
import processing.pdf.*; //A4 の大きさは 297mm x 210 mm //72dpiの場合 842px X 595px void setup() { size(595, 842, PDF, "filename.pdf"); colorMode(HSB, 255,255,255); background(255); ellipseMode(CENTER); //smooth(); } void line2(int x1, int y1, int x2, int y2){ float h = random(255); for(int x=x1; x<x2; x++){ float h_diff = random(3); h+=h_diff; if(h>360){ h-= 360; } float s=random(50,80); float b=random(240,255); color col=color(h,s,b); stroke(col); float y = y1 + random(0,0.2); point(x, y); } } //mainly red void line3(int x1, int y1, int x2, int y2){ float hW=10; float hyu=0; float h = random(hyu-hW, hyu+hW); for(int x=x1; x<x2; x++){ float h_diff = random(-3,3); h+=h_diff; if(h < hyu-hW){ h = hyu-hW; } if(h > hyu+hW){ h = hyu+hW; } float s=random(150,180); float b=random(200,215); color col=color(h,s,b); stroke(col); float y = y1 + random(0,0.2); point(x, y); } } void draw() { int H=30; int W=30; for(int i=H*2; i<height-H*2; i+=H){ int x1=0+W; int x2=width-W; int y1=i; int y2=i; line2(x1,y1,x2,y2); } line3(0+W, H, width-W, H); line3(0+W, height-H, width-W, height-H); // Exit the program println("Finished."); exit(); }