正在加载视频...

视频加载失败

//#つぶやきProcessing int n=999999,p[]=new int[n],i,j; float t=1; void setup(){ size(800,800); for(i=2;i<n;i++)if(p[i]==0)for(j=i+i;j<n;j+=i)p[j]=i; } void draw(){ clear(); stroke(-1); for(i=2;i<n;i++)if(p[i]==0)circle(i*sin(i*t)/99+400,i*cos(i*t)/99+400,2); t+=1e-7; }

162,546 次观看 • 2 年前 •via X (Twitter)

9 条评论

ひさだん 的头像
ひさだん2 年前

ソスウノカシカを見に来た。一次元の数列を二次元でどう表現しているのかが気になったので見に来たんだけど、面白かった。素数螺旋の角度を変えると見え方が変わるというハックがあったので、動的に変わっていくようなものを早速作ってみた。あと、素数のパターンを布にするというのは面白いアイデア。

Milton Mamani Torres 的头像
Milton Mamani Torres2 年前

n:=99999.p:=Array new: n withAll: 0.t:=1.c:=RSCanvas new. 3to:n do:[:i|(p at: i)==0ifTrue:[(i+i to:n by: i)do:[:j | p at: j put: i]]]. c newAnimation onStepDo: [c clear. 3 to: n do:[:i|(p at:i)==0ifTrue:[c newCircle radius: 2; position: (i*t)sin@(i*t)cos*i/99]]. t:=t+1e-7. ]

ひさだん 的头像
ひさだん2 年前

Pharo?

simp 4 satoshi 的头像
simp 4 satoshi2 年前

3blue1brown posted a video of this prime number spiral explanation it’s not as cool tho

Ahab 的头像
Ahab2 年前

@MoriYuzan Great Work 👏👏👏👏

Sotiris Makrygiannis 的头像
Sotiris Makrygiannis2 年前

@MoriYuzan Oh!!! Lovely 🌹

Castani 的头像
Castani2 年前

:)!

LayBacc 的头像
LayBacc2 年前

すげー!

LiCHtsLiCH 的头像
LiCHtsLiCH2 年前

Love this shift. Had an old galaxy phone that could do the same thing... as a background... can't find it anyware.

相关视频

i n j e c t i t
3:01

Sensitive content

i n j e c t i t

al !

205,859 次观看 • 1 年前