5,24,1
21,1
,
,#惑星の誕生
,black
,gravity
,axis
,range -5<\c>5
,set t1=2*pi*rnd
,set r1=10*rnd
,define x=r1*cos(t1)
,define y=r1*sin(t1)
,define z=exp(-x^2-y^2)
,define vx=-y/5
,set vy=vx/5
,set vz=0
,set col=rainbow(rnd)
,define r=(massp$/300000)^0.333*0.2
,set col=rainbow(rnd)
,loop 50
,particle p$<\c>300000<\c>0<\c> x<\c>y<\c>z<\c>vx<\c>vy<\c>vz
,ball (xp$<\c>yp$<\c>zp$)<\c>r<\c>col
,endloop
,print (0<\c>-6<\c>-5)<\c>"太陽距離×10<\c> 太陽質量"<\c>&Hffffff<\c>20
21,1
,
,#惑星の誕生
,black
,gravity
,axis
,range -5<\c>5
,set t1=2*pi*rnd
,set r1=10*rnd
,define x=r1*cos(t1)
,define y=r1*sin(t1)
,define z=exp(-x^2-y^2)
,define vx=-r1^0.2*sin(t1)
,set vy=r1^0.2*cos(t1)
,set vz=0
,set col=rainbow(rnd)
,define r=(massp$/300000)^0.333*0.2
,set col=rainbow(rnd)
,loop 50
,particle p$<\c>300000<\c>0<\c> x<\c>y<\c>z<\c>vx<\c>vy<\c>vz
,ball (xp$<\c>yp$<\c>zp$)<\c>r<\c>col
,endloop
,print (0<\c>-6<\c>-5)<\c>"太陽距離×10<\c> 太陽質量"<\c>&Hffffff<\c>20
18,1
,
,#100個の天体
,black
,gravity
,axis
,range -4<\c>4
,set x=10*rnd-5
,set y=10*rnd-5
,set z=10*rnd-5
,set vx=0
,set vy=0
,set vz=0
,set col=rainbow(rnd)
,define r=(massp$/60000)^0.333*0.15
,set col=rainbow(rnd)
,loop 100
,particle p$<\c>30000<\c>0<\c> x<\c>y<\c>z<\c>vx<\c>vy<\c>vz
,ball (xp$<\c>yp$<\c>zp$)<\c>r<\c>col
,endloop
24,1
,
,#面白い惑星形成過程
,black
,gravity
,axis
,center s
,define rs=(masss/60000)^0.333*0.1
,planet s<\c>3330000<\c>0<\c> 0<\c>0<\c>0<\c> 0<\c>0<\c>0
,ball (xs<\c>ys<\c>zs)<\c>rs<\c>&Hff0000
,set r1=4*abs(nrnd)+1
,set a=2*pi*rnd
,#set z1=0
,set z1=0.4rnd-0.2
,set c=rainbow(rnd)
,define x=r1*cos(a)
,define y=r1*sin(a)
,define z=0
,define vx=-(10/r1)^0.5*sin(a)
,define vy=(10/r1)^0.5*cos(a)
,define vz=0
,define rp=(massp$/60000)^0.333*0.1
,loop 200
,planet p$<\c>10000<\c>0<\c> x<\c>y<\c>z<\c> vx<\c>vy<\c>vz
,ball (xp$<\c>yp$<\c>zp$)<\c> rp<\c> c
,endloop
24,1
,
,#惑星形成周りは高密度
,black
,gravity
,axis
,center s
,define rs=(masss/60000)^0.333*0.1
,planet s<\c>3330000<\c>0<\c> 0<\c>0<\c>0<\c> 0<\c>0<\c>0
,ball (xs<\c>ys<\c>zs)<\c>rs<\c>&Hff0000
,set r1=1000*abs(nrnd)+1
,set a=2*pi*rnd
,#set z1=0
,set z1=0.4*rnd-0.2
,set c=rainbow(rnd)
,define x=r1^0.2*cos(a)
,define y=r1^0.2*sin(a)
,define z=0
,define vx=-(10/r1^0.2)^0.5*sin(a)
,define vy=(10/r1^0.2)^0.5*cos(a)
,define vz=0
,define rp=(massp$/60000)^0.333*0.2
,loop 100
,planet p$<\c>1000<\c>0<\c> x<\c>y<\c>z<\c> vx<\c>vy<\c>vz
,ball (xp$<\c>yp$<\c>zp$)<\c> rp<\c> c
,endloop


