ただのホビープログラマ。Processingで思いつくままにショートコーディング。日々の出来事とか読んだ本の感想などの自分用のライフログはblueskyの方に移りました。こっちはProcessing中心で。

Joined January 2010
2,297 Photos and videos
Pinned Tweet
30 Oct 2025
これまで #Processing で作ってきたものをまとめたサイトが1,100ページになった!約半年で100ページ増えた。 The site I've been making my short programs by #Processing has reached 1,100 pages! scrapbox.io/hisadan/
2
2
19
1,443
//#Processing float x,r,h,t; void setup(){size(800,800,P3D);} void draw(){ background(0);noFill(); camera(999,999,999*cos(t/2),0,0,0,0,0,-1); for(r=0;r<TAU;r =PI/9){ beginShape(); for(x=99*(cos(t)-1);x<800;x =9){ stroke(-1); vertex(x*sin(r),x*cos(r), //cont.
1
12
66
1,928
//cont. h=pow(x 500*cos(t)-300,3)/5e5); if(r==0&&x>0){ stroke(-1,300-x/2); push();translate(0,0,h); circle(0,0,x*2);pop(); }} endShape();} t =.01;}
1
2
137
//#Processing float t; void setup(){ size(800,800,P3D); } void draw(){ background(0); camera(900*sin(t),500*cos(t),900*cos(t),0,0,0,0,-1,0); lights(); fill(-1,128*(1 cos(t))); stroke(-1,128*(1-cos(t))); a(0,0,0,300); t =.01; } void a(float x,float y,float z,float d){ //cont.
1
7
36
798
//cont. if(d>10){ push(); translate(x,y,z); if(d<100){ box(d); }else{ sphere(d); } for(float k=-d*3;k<=d*3;k =6*d){ a(0,0,k*sin(t),d/2); a(0,k*sin(t),0,d/2); a(k*sin(t),0,0,d/2); } pop(); } }
1
1
162
//#つぶやきProcessing float d,k,n,r,t; void setup(){ size(800,800); } void draw(){ background(-1); noFill(); k=1; for(n=1;n<7;n ){ k*=2; for(r=0;r<TAU;r =TAU/k)circle((d=40*n*sin(t) 2000/k*cos(t))*sin(r t) 400,d*cos(r t) 400,99*cos(t)); } t-=.01; }
18
64
3,011
//#つぶやきProcessing float t; void setup(){size(800,800);} void draw(){ background(-1);colorMode(3); a(400,400,200); t =.01;} void a(float x,float y,float d){ if(d>9){ fill(d*t%6,255,255,d);circle(x,y,d); for(float r=0;r<TAU;r =PI*25/d)a(d*sin(r) x,d*cos(r) y,d/(3 cos(t)));}}
1
9
31
1,107
そろそろ梅雨入り。紫陽花の季節。
153
//#Processing float t; void setup(){ size(800,800); rectMode(CENTER); } void draw(){ background(-1); a(400,400,200); t =.01; } void a(float x,float y,float d){ if(d>9){ push(); if(d%2==0){ square(x,y,2*d*(1 cos(t))); }else{ circle(x,y,2*d*(1-cos(t))); } a(x d,y d,d/2); //cont.
3
9
63
2,693
//cont. a(x-d,y d,d/2); a(x d,y-d,d/2); a(x-d,y-d,d/2); pop(); } }
1
134
//#Processing float t; void setup(){ size(800,800,P3D); } void draw(){ background(-1); camera(200,700*cos(t),500*cos(t/2),0,0,99,0,0,-1); a(0,0,200); t =PI/500; } void a(float x,float y,float d){ float r,p,q; if(d>9){ push(); translate(x,y,d/2); beginShape(); //cont.
3
4
37
1,353
//cont. for(r=0;r<TAU;r =TAU/(4.5-1.5*cos(t))){ vertex(p=d*sin(r),q=d*cos(r)); a(p,q,d/2); } endShape(2); pop(); } }
1
1
130
//#Processing int n=9999,i; float a[]=new float[n*2],t; void setup(){ size(800,800); for(i=0;i<n;i ){ a[i]=random(550); a[i n]=random(TAU); } background(0); } void draw(){ t =.005; fill(0,2); square(-1,-1,802); stroke(-1,99); for(i=0;i<n;i ){ point(a[i]*sin(a[i n]) 400, //cont.
1
8
46
1,043
//cont. a[i]*cos(a[i n]) 400); a[i]-=sin(noise(a[i])*PI t); a[i n] =sin((noise(a[i n]))*PI)/99; } }
1
142
さっきのを小改造。
116
//#Processing int n=9999,i; float a[]=new float[n*2],t=999; void setup(){ size(800,800); colorMode(HSB); background(0); } void draw(){ if(t >255){ t=0; noiseSeed((int)random(999)); for(i=0;i<n;i ){ a[i]=random(550); a[i n]=random(TAU); } } fill(0,2); square(-1,-1,802); //cont.
2
11
56
1,131
//cont. stroke(t,255,255); for(i=0;i<n;i ){ point(a[i]*sin(a[i n]) 400,a[i]*cos(a[i n]) 400); a[i]-=sin(noise(a[i])*PI); a[i n] =sin((1-2*noise(a[i n]))*PI)/99; } }
1
139
今日の昼間やってた久しぶりのお散歩コーディング。去年7,980円で買った初代のSurface Go(4GB mem 64GB eMMC)のOSをUbuntuに入れ替えたので、お散歩に持ち出してみた。正直かなり遅いけど、軽いのでお散歩のお供にはとても良い。
165
ひさだん retweeted
the most famous comment in all of C programming history. written by a developer at id Software in 1999 for Quake III Arena one line of pointer casting, one bit shift, one subtraction and somehow you have 1/√x. just bit manipulation, a constant, and a final newton refinement step. the comment reads: "what the f***?"
34
206
1,864
215,807
//#Processing recurring decimal int a=1, b=1, w, i, j, x, y; size(800, 800); background(-1); for (i=0; i<100; i ) { x=80*(i); y=80*(i/10); fill(0); text(a "/" b, x 5, y 15); noFill(); square(x, y, 80); beginShape(); for (j=0; j<100; j ) { w=a/b; //cont.
1
8
37
1,066
//cont. vertex(x 40 30*sin(w*PI/5), y 45-30*cos(w*PI/5)); a=(a-b*w)*10; if (a==0) { fill(#FFFF00, 50); square(x, y, 80); break; } } endShape(); a=1; b ; }
1
171
久しぶりに動かないものを作ってみた。循環小数の図示。黄色は割り切れて循環小数にならないもの。
112