gnuplot上の様々なアニメーションを作ります。
dofor構文を使うのでgnuplot ver4.6以降じゃないとこの方法は出来ません。
- 解析解の表示
- データの表示
- 応用
- 動画の作成について
[adsense1]
1次元の場合の具体例
試しに量子力学で現れる、ガウシアン波束の時間発展を考えましょう。
こんな形の方程式を考えます。
\(
\displaystyle y(x,t)=\left(\frac{1}{1+t^2}\right)^{1/2}\exp\left[-\frac{(x-t)^2}{1+t^2}\right]
\)
これをgnuplot上で時間発展させるスクリプトはこちら。
t=i*0.02
plot sqrt(1/(1+t*t))*exp(-(x-t)**2/(1+t*t))
}
適宜xrangeとかyrangeとか変更してください。実行するとこんな感じ。
上のgifアニメを得るには、
set output 'movie.gif'
do for [i = 0:400 ] {
t=i*0.02
plot sqrt(1/(1+t*t))*exp(-(x-t)**2/(1+t*t)) lw 2
}
set out
set terminal wxt enhanced
というスクリプトを使ってください。
同ディレクトリにmovie.gifが作成されます。
ターミナルとかは各々の環境に合わせてください。
2次元の場合の具体例
2次元だろうとこのように簡単にできます。
上の動画のスクリプトはこれです。gifアニメが欲しい場合はコメントアウトを外してください。
#set output 'movie.gif'
set pm3d at b
set xr[-5:10]
set yr[-5:10]
set zr[0:1]
set cbr[0:1]
set isosamples 50
do for [i = 0:50 ] {
t=i*0.05
splot sqrt(1/(1+t*t))*exp(-(x-t)**2/(1+t*t))*sqrt(1/(1+t*t))*exp(-(y-2*t)**2/(1+t*t))
}
#set out
#set terminal wxt enhanced
点をグラフ上に沿って動かす
のような動画を作りたいとします。この時は、媒介変数を用いて以下のスクリプトで再現されます。
#set output 'movie.gif'
set param
set size ratio -1
set samples 10000
e = 1
omega=0.1
set tr[1:600]
do for [i = 1:200 ] {
plot e*cos(omega*t)/sqrt(t), sin(omega*t)/sqrt(t)
set label 1 point pt 7 ps 3 at e*cos(omega*i*3)/sqrt(i*3),sin(omega*i*3)/sqrt(i*3)
}
#set out
#set terminal wxt enhanced
点の表示は、
の文である1点だけを表示することができます。
グラフをだんだんと書いていく
set samples 10000
set tr[0.01:1]
imax=100
tmax=20e0*pi
ht=tmax/real(imax)
#set term gif animate optimize delay 6 size 600,600
#set output 'orbit.gif'
do for [i=1:imax] {
th(t,i)=t*real(i)*ht
plot 10e0*sin(th(t,i))/th(t,i),10e0*cos(th(t,i))/th(t,i) , \
10e0*sin(th(t,i)-pi)/th(t,i),10e0*cos(th(t,i)-pi)/th(t,i) lt 1 lc 2
}
#set out
#set terminal wxt enhanced
データの場合(200行のデータ”outgraph.d”を一行目から順番に出力したい場合)
plot "outgraph.d" every ::0:0:i:0 using 1:2 w l
}
グラフを回転させる
ある3Dプロットがあり、それを回転させてみるような動画がほしいとします。例えばこんな感じのアニメーションが作りたいとします。
これはリーマン面と呼ばれる関数です。(カラーバーの消去は ‘unset colorbox’ とすれば消せます。)
詳しい記述は角度に依存して色を付ける(gnuplot)に書いてあるので気になる人は参照してください。
set parametric
set ur[0.01:5]
set vr[0:4*pi]
i={0,1}
splot u*cos(v),u*sin(v),real(sqrt(u)*exp(i*0.5*v))
#set term gif animate optimize size 480,360
#set output 'movie.gif'
do for [j = 0:90 ] {
set view 60,4*j,1,1
replot
}
#set out
#set terminal wxt enhanced
参考先はamesyabodyの記述したモンテカルロ法のページからです。
複数のデータを次々とプロット
複数のデータを時間経過を表示させる場合はデータfort.100, fort.101, fort.102,…を用意し、dofor構文の中を変えて、
#set output 'movie.gif'
do for [j = 100:200 ] {
splot sprintf("./fort.%d", j) u 1:2:3 w l t sprintf("./fort.%d", j)
}
#set out
#set terminal wxt enhanced
してloadすればいいです。
複数グラフの同時プロット
data1.d, data2.d, data3.d,data4.d,data5.d
を同時に出力したい時は、
とすればいいです。
大きさの違う球体
A = ''
do for [i = 1:num] {
A = A . sprintf('%f ', 1e0/i)
}
do for [j=1:119] {
t=0.05*j
set view 68,j*1.5,1,1
A=''
do for [i = 1:num] {
A = A . sprintf('%f ', 1e0/sqrt(1+10*sin(t+i*(2e0*pi)/num)**2))
}
splot for [i= num:1:-1 ] word(A,i)*sin(u)*cos(v),word(A,i)*sin(u)*sin(v),word(A,i)*cos(u)
}
PSO2の転送装置
set samples 50
set view equal xy
set xr[-1.5:1.5]
set yr[-1.5:1.5]
set zr[0:2]
set ur[0:2*pi]
set ticslevel 0
cycle=1000
num=10
r=1e0
cr=0.5e0
ar=0.25e0
intvl=cycle/num
print intvl
w=2e0/cycle
osc(x)=2e0*(x*pi*w-floor(x*pi*w))
#set term gif animate optimize delay 10 size 480,360
#set output 'movie.gif'
set arrow from r*cos(0),r*sin(0),0 to r*cos(0),r*sin(0),2.2 nohead lw 1.5 lc 3
set arrow from r*cos(2e0*pi/3e0),r*sin(2e0*pi/3e0),0 to r*cos(2e0*pi/3e0),r*sin(2e0*pi/3e0),2.2 nohead lw 1.5 lc 3
set arrow from r*cos(4e0*pi/3e0),r*sin(4e0*pi/3e0),0 to r*cos(4e0*pi/3e0),r*sin(4e0*pi/3e0),2.2 nohead lw 1.5 lc 3
do for [i=0:119]{
splot \
cr*sin(u),cr*cos(u),0 lc 4, \
ar*sin(u)+r*cos(0e0*pi/3e0),ar*cos(u)+r*sin(0e0*pi/3e0),0 lc 4, \
ar*sin(u)+r*cos(2e0*pi/3e0),ar*cos(u)+r*sin(2e0*pi/3e0),0 lc 4, \
ar*sin(u)+r*cos(4e0*pi/3e0),ar*cos(u)+r*sin(4e0*pi/3e0),0 lc 4, \
r*sin(u),r*cos(u),osc(i) lc 3 , \
r*sin(u),r*cos(u),osc(i-intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-2*intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-3*intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-4*intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-5*intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-6*intvl) lc 3, \
r*sin(u),r*cos(u),osc(i-7*intvl) lc 3
}
#set out
#set terminal wxt enhanced
「見せてあげよう!ラピュタの雷を!!」
set samples 50
set view equal xy
set xr[-1.5:1.5]
set yr[-1.5:1.5]
set zr[0:8]
set ur[0:2*pi]
set ticslevel 0
r=1e0
h=7.5e0
unset arrow
unset key
#set term gif animate optimize delay 4 size 400,800
#set output 'movie.gif'
do for [i=0:6]{
set arrow from 1.2e0*r*cos(real(i)*pi/3.5e0),1.2e0*r*sin(real(i)*pi/3.5e0),h+0.5e0 to r*cos(real(i)*pi/3.5e0),r*sin(real(i)*pi/3.5e0),h nohead lw 3 lc 3
}
dc(a,x)=exp(-(x/a)**2e0)
decay=1e0
do for [i=0:200:2]{
splot r*sin(u),r*cos(u),h-0.5e0+dc(decay,0.01e0*real(i))*0.75e0*rand(0) lc 4
}
do for [i=1:36:2]{
splot r*sin(u)/sqrt(real(i)),r*cos(u)/sqrt(real(i)),h-0.5e0 lc 4
}
do for [i=0:50:2]{
splot r/6e0*sin(u)*cos(v),r/6e0*sin(u)*sin(v),h-0.5e0+r/6e0*cos(u)*(1e0-dc(decay,real(i)*0.1e0)) lc 4
}
do for [i=0:10:2]{
splot r/6e0*sin(u)*cos(v),r/6e0*sin(u)*sin(v),h-0.5e0+r/6e0*cos(u)*2e0*(2e0-dc(decay,real(i)*0.3e0))-i lc 4
}
#set out
#set terminal wxt enhanced
魔女の宅急便
魔女の数式はこちらです。
witch like curve -wolfram alpha
# Date : 2016/01/22(yyyy/mm/dd)
# Author : sikino
# "witch like curve" from wolfram alpha
set parametric
set ur[0:1]
set vr[0:1]
set xr[-20:5]
set yr[-5:6]
set zr[-3:5]
set samples 41
set isosamples 11
set view equal xyz
set ticslevel 0
set view 79,62,3.3,1
#set view 0,0,2,1
unset key
# === read wx(t) and wy(t) form of witch from wolfram alpha === #
wx(t) = 10e0/7*sin(13e0/3-48*t)+sin(47e0/10-46*t)+14e0/11*sin(33e0/8-45*t)+7e0/9*sin(3e0/4-44*t)+13e0/7*sin(51e0/11-41*t)+23e0/8*sin(2e0/9-40*t)+2e0/3*sin(17e0/9-38*t)+55e0/18*sin(61e0/13-36*t)+21e0/8*sin(55e0/12-35*t)+13e0/4*sin(23e0/6-34*t)+24e0/11*sin(26e0/11-33*t)+19e0/8*sin(105e0/26-32*t)+11e0/5*sin(55e0/14-31*t)+37e0/11*sin(12e0/5-30*t)+32e0/7*sin(39e0/11-29*t)+12e0/7*sin(29e0/9-28*t)+89e0/14*sin(16e0/13-26*t)+65e0/8*sin(26e0/7-24*t)+17e0/5*sin(14e0/13-23*t)+6e0/7*sin(19e0/11-21*t)+65e0/7*sin(41e0/21-20*t)+11e0/4*sin(11e0/9-19*t)+46e0/13*sin(14e0/3-18*t)+8*sin(18e0/11-17*t)+34e0/3*sin(13e0/10-16*t)+34e0/11*sin(20e0/21-15*t)+23e0/8*sin(23e0/5-14*t)+83e0/8*sin(13e0/5-11*t)+97e0/6*sin(32e0/9-10*t)+202e0/13*sin(47e0/12-9*t)+107e0/7*sin(17e0/4-8*t)+133e0/10*sin(13e0/12-7*t)+71e0/2*sin(11e0/5-6*t)+727e0/13*sin(7e0/5-4*t)+44e0/3*sin(29e0/8-3*t)+143e0/2*sin(11e0/8-2*t)+2244e0/7*sin(17e0/9-t)-719e0/13*sin(5*t+5e0/7)-37e0/6*sin(12*t+3e0/8)-419e0/21*sin(13*t+33e0/34)-62e0/25*sin(22*t+1)-47e0/12*sin(25*t+37e0/36)-16e0/9*sin(27*t+7e0/9)-4e0/3*sin(37*t+11e0/7)-22e0/13*sin(39*t+4e0/7)-15e0/7*sin(42*t+4e0/3)-1e0/2*sin(43*t+1e0/5)-21e0/11*sin(47*t+9e0/7)
wy(t) = 12e0/13*sin(4e0/3-48*t)+10e0/11*sin(17e0/6-46*t)+3e0/7*sin(1e0/15-45*t)+14e0/15*sin(19e0/7-43*t)+5e0/9*sin(9e0/7-42*t)+4e0/3*sin(11e0/12-41*t)+7e0/5*sin(17e0/7-40*t)+8e0/9*sin(19e0/8-39*t)+7e0/11*sin(15e0/4-37*t)+43e0/21*sin(3e0/2-36*t)+5e0/11*sin(2e0/3-35*t)+5e0/3*sin(20e0/9-34*t)+10e0/7*sin(29e0/8-33*t)+11e0/8*sin(2e0/11-32*t)+53e0/27*sin(14e0/9-30*t)+21e0/10*sin(2e0/5-29*t)+14e0/5*sin(9e0/4-28*t)+8e0/5*sin(22e0/13-26*t)+25e0/7*sin(34e0/11-24*t)+33e0/8*sin(53e0/18-22*t)+3e0/4*sin(3e0/7-21*t)+21e0/11*sin(37e0/11-20*t)+21e0/11*sin(27e0/8-19*t)+9e0/5*sin(47e0/11-18*t)+32e0/9*sin(23e0/9-17*t)+20e0/9*sin(5e0/7-16*t)+23e0/7*sin(29e0/7-15*t)+55e0/27*sin(4e0/11-14*t)+19e0/3*sin(3e0/11-13*t)+23e0/4*sin(23e0/7-12*t)+37e0/8*sin(1e0/12-10*t)+77e0/8*sin(33e0/7-9*t)+196e0/11*sin(7e0/5-8*t)+147e0/11*sin(82e0/27-7*t)+193e0/6*sin(17e0/8-6*t)+103e0/8*sin(53e0/18-5*t)+97e0/5*sin(4e0/13-3*t)+7681e0/23*sin(35e0/9-t)-323e0/4*sin(2*t+6e0/7)-521e0/13*sin(4*t+7e0/5)-19e0/3*sin(11*t+1e0/4)-30e0/7*sin(23*t+8e0/15)-23e0/17*sin(25*t+5e0/4)-37e0/16*sin(27*t+2e0/3)-7e0/6*sin(31*t+3e0/5)-8e0/15*sin(38*t+1e0/5)-1e0/2*sin(44*t+5e0/11)-2e0/5*sin(47*t+1e0/15)
#=== = = = = = = = = = = ===#
vg=0.04e0 # velocity of ground
gxr=30e0 # field length of x
gyr=30e0 # field length of y
cgx=-10e0 # center of ground x
cgy=-5e0 # center of ground y
cgz=-3e0 # center of ground z
r1=0.06e0 # radius of broom hilt and edge
L1=2e0 # length of broom hilt
r2=0.5e0 # radius of broom edge
L2=1.5e0 # length of broom edge
h=0e0 # height of broom
th=68e0 # angle of broom
wpx=0e0 # broom position of x
wpy=0e0 # broom position of y
wpz=1e0 # broom position of z
nb=11 # number of bird
br=0.2e0 # magnitude of birds
clap=15e0 # clap speed of birds
bpx = ''
bpy = ''
bpz = ''
cb=(nb+1)/2
do for [i = 1:nb] {
bpx = bpx . sprintf('%f ', 1.2e0*real(i-cb)-8e0) # position x of bird
bpy = bpy . sprintf('%f ', 0.8e0*real(abs(i-cb))-4e0) # position y of bird
bpz = bpz . sprintf('%f ', 2e0) # position z of bird
}
omega=8e0 # up-down frequency
amp=0.3e0 # up-down Amplitude
udt(a,w,i)=a*sin(i*w*pi/180e0)
witz=1.5e0 # witch position z
witchx(u)=0e0 # witch position x
witchy(u)=0.003e0*wx(u*2e0*pi) # witch position y
witchz(u)=0.003e0*wy(u*2e0*pi)+witz # witch position z
bx(u)=r1*cos(u*2e0*pi) # broom hilt x
by(u)=r1*sin(u*2e0*pi) # broom hilt y
bz(u)=u*L1+h # broom hilt z
brx(v)=bx(v)+wpx # broom rotate x
bry(u,v,th)=by(v)*cos(th*pi/180e0)-bz(u)*sin(th*pi/180e0)+wpy # broom rotate y
brz(u,v,th)=by(v)*sin(th*pi/180e0)+bz(u)*cos(th*pi/180e0)+wpz # broom rotate z
ex(u,v)=((r1-r2)*u+r2)*cos(v*2e0*pi) # broom edge x
ey(u,v)=((r1-r2)*u+r2)*sin(v*2e0*pi) # broom edge y
ez(u)=L2*u+h-L1*0.5e0-(L2-1e0) # broom edge z
erx(u,v)=ex(u,v)+wpx
ery(u,v,th)=ey(u,v)*cos(th*pi/180e0)-ez(u)*sin(th*pi/180e0)+wpy
erz(u,v,th)=ey(u,v)*sin(th*pi/180e0)+ez(u)*cos(th*pi/180e0)+wpz
ground(u,v)=rand(int(u*v))+cgz # make ground
birdx(t)=br*(t*0.6e0-sin(t)) # bird x
birdy(i,t)=br*(1e0-cos(t))+12e0*sin(real(clap*i)*pi/180e0)*abs(br*(sin(t*0.25e0)))**2
# bird y
bix(u,j)=birdx((u-0.5e0)*3e0*pi)+word(bpx,j)
biy(j)=1e0+word(bpy,j)
biz(u,i,j)=birdy(i,(u-0.5e0)*3e0*pi)+word(bpz,j)
#set term gif animate optimize delay 4 size 560,360
#set output 'kiki.gif'
imax=100 # max time
do for [i=1:imax] {
splot for [j=1:nb] bix(u,j),biy(j),biz(u,i+7*j,j) lc 6 lt 1 , \
witchx(u),witchy(u),witchz(u)+udt(amp,omega,i) lc 7 lt 1, \
brx(v),bry(u,v,th),brz(u,v,th)+udt(amp,omega,i) lc 1 lt 1, \
erx(u,v),ery(u,v,th),erz(u,v,th)+udt(amp,omega,i) lc 1 lt 1 , \
(u-0.5e0)*gxr+cgx,(v-0.5e0)*gyr+vg*real(i)+cgy,ground(u,v) lc 2 lt 1 lw 1
}
# +---------------------+
ev=0.01e0 # go-away velocity change related to witch
vbix=2e0*ev # go-away velocity bird x
vbiy=1e0*ev # go-away velocity bird y
vbiz=3e0*ev # go-away velocity bird z
binter=3 # interbal of bird far away
goaway(i,t)=(sgn(i-t)+1e0)*(i-t)**2e0 # go-away at "i" lager than to "t"
sg(x)=-sgn(0.5e0*(x-0.5e0)-floor(0.5e0*(x-0.5e0))-0.5e0) # odd(even) number 1(-1)
thb=20e0 # go-away angle of bird
birxt(th,u,i,j)=cos(sg(j)*th*pi/180e0)*(bix(u,j)-word(bpx,j))+sin(sg(j)*th*pi/180e0)*(biz(u,i,j)-word(bpz,j)) # clap + rotate
biryt(u,i,j)=biy(j)
birzt(th,u,i,j)=-sin(sg(j)*th*pi/180e0)*(bix(u,j)-word(bpx,j))+cos(sg(j)*th*pi/180e0)*(biz(u,i,j)-word(bpz,j))
birx(th,u,i,j)=birxt(th,u,i+imax,j)+vbix*goaway(i,binter*(j-1))+word(bpx,j)
biry(u,i,j)=biryt(u,i+imax,j)+sg(j)*vbiy*goaway(i,binter*(j-1))
birz(th,u,i,j)=birzt(th,u,i+imax+7*j,j)+vbiz*goaway(i,binter*(j-1))+word(bpz,j)
thw=20e0 # angle of witch
evw=0.02e0 # go-away velocity change related to witch
vwx=2e0*evw # go-away velocity witch x
vwy=1e0*evw # go-away velocity witch y
vwz=3e0*evw # go-away velocity witch z
tiw=binter*(nb+1) # go-away time
witch2x(th,u,i)=cos(th*pi/180e0)*witchx(u)+sin(th*pi/180e0)*(witchz(u)-witz)
witch2y(u,i)=witchy(u)
witch2z(th,u,i)=-sin(th*pi/180e0)*witchx(u)+cos(th*pi/180e0)*(witchz(u)-witz)
witrx(th,u,i)=witch2x(th,u,i+imax)+vwx*goaway(i,tiw)
witry(u,i)=witch2y(u,i+imax)+vwy*goaway(i,tiw)
witrz(th,u,i)=witch2z(th,u,i+imax)+vwz*goaway(i,tiw)+witz
brox(i,v)=brx(v)+vwx*goaway(i,tiw)+0.5e0*(sgn(i-tiw)+1e0)*0.1e0
broy(i,u,v)=bry(u,v,th)+vwy*goaway(i,tiw)
broz(i,u,v)=brz(u,v,th)+vwz*goaway(i,tiw)
erx(u,v)=ex(u,v)+wpx
ery(u,v,th)=ey(u,v)*cos(th*pi/180e0)-ez(u)*sin(th*pi/180e0)+wpy
erz(u,v,th)=ey(u,v)*sin(th*pi/180e0)+ez(u)*cos(th*pi/180e0)+wpz
edrx(i,u,v)=ex(u,v)+wpx+vwx*goaway(i,tiw)+0.5e0*(sgn(i-tiw)+1e0)*0.1e0
edry(i,u,v)=ey(u,v)*cos(th*pi/180e0)-ez(u)*sin(th*pi/180e0)+wpy+vwy*goaway(i,tiw)
edrz(i,u,v)=ey(u,v)*sin(th*pi/180e0)+ez(u)*cos(th*pi/180e0)+wpz+wpx+vwz*goaway(i,tiw)
do for [i=1:60] {
splot for [j=1:nb] birx(0.5e0*(sgn(i-binter*(j-1))+1e0)*thb,u,i,j),biry(u,i,j),birz(0.5e0*(sgn(i-binter*(j-1))+1e0)*thb,u,i,j) lc 6 lt 1 ,\
witrx(0.5e0*(sgn(i-tiw)+1e0)*thw,u,i),witry(u,i),witrz(0.5e0*(sgn(i-tiw)+1e0)*thw,u,i)+udt(amp,omega,i+imax) lc 7 lt 1,\
brox(i,v),broy(i,u,v),broz(i,u,v)+udt(amp,omega,i+imax) lc 1 lt 1, \
edrx(i,u,v),edry(i,u,v),edrz(i,u,v)+udt(amp,omega,i+imax) lc 1 lt 1, \
(u-0.5e0)*gxr+cgx,(v-0.5e0)*gyr+vg*real(i+imax)+cgy,ground(u,v) lc 2 lt 1
}
#set out
#set terminal wxt enhanced
第5使徒ラミエル1
set hidden3d
set param
unset key
set xr[-2:2]
set yr[-4:2]
set zr[-2:2]
set vr[0:pi]
set ticslevel 0
set view equal xyz
set isosamples 21
set view 76,31,2,1
set xl "x"
set yl "y"
a=1e0
fl(x)=0.5e0*(floor(x)-floor(-x)-1e0)
k(a,b,x)=fl((x+a)/(a+b))-fl(x/(a+b))
kk(a,b,x)=2e0*(k(a,b,x)-0.5e0)
s2(x)=x+floor(-x)+1e0
s(a,x)=2e0*abs(s2(x/(a*2))-0.5e0)*kk(a*2e0,a*2e0,x+a)
usx(a,u,v)=s(a,v)*s(a,u)
usy(a,u,v)=s(a,v)*s(a,u+a)
dsx(a,u,v)=s(a,v)*s(a,u)
dsy(a,u,v)=s(a,v)*s(a,u+a)
#set term gif animate optimize delay 3 size 700,400 \
#x009e73 x56b4e9 xe69f00 xf0e442 x0072b2 xe51e10
#set output 'ramiel.gif'
hz=0.35e0
imax=50
vz=hz/real(imax)
do for [i=1:imax]{
t=real(i)
splot \
usx(a,u,v),usy(a,u,v), abs(s(a,v+1e0))+vz*t lc 1 lt 1, \
dsx(a,u,v),dsy(a,u,v),-abs(s(a,v+1e0))-vz*t lc 1 lt 1
}
dc(a,x)=exp(-(x/a)**2e0)
r=0.25e0
imax=100
omg=0.5e0
do for [i=1:imax]{
rt=r*(1e0-dc(30e0,real(i)))
splot \
usx(a,u,v)*cos(omg*real(i)*pi/180e0)-usy(a,u,v)*sin(omg*real(i)*pi/180e0),usx(a,u,v)*sin(omg*real(i)*pi/180e0)+usy(a,u,v)*cos(omg*real(i)*pi/180e0), abs(s(a,v+1e0))+hz lc 1 lt 1, \
usx(a,u,v)*cos(omg*real(i)*pi/180e0)+usy(a,u,v)*sin(omg*real(i)*pi/180e0),-usx(a,u,v)*sin(omg*real(i)*pi/180e0)+usy(a,u,v)*cos(omg*real(i)*pi/180e0), -abs(s(a,v+1e0))-hz lc 1 lt 1, \
rt*sin(u)*cos(v),rt*sin(u)*sin(v),rt*cos(u)+0.15e0*(rand(0)-0.5e0) w l lc 4 lt 1
}
do for [i=1:79]{
splot \
usx(a,u,v)*cos(omg*real(imax+i)*pi/180e0)-usy(a,u,v)*sin(omg*real(imax+i)*pi/180e0),usx(a,u,v)*sin(omg*real(imax+i)*pi/180e0)+usy(a,u,v)*cos(omg*real(imax+i)*pi/180e0), abs(s(a,v+1e0))+hz lc 1 lt 1, \
usx(a,u,v)*cos(omg*real(imax+i)*pi/180e0)+usy(a,u,v)*sin(omg*real(imax+i)*pi/180e0),-usx(a,u,v)*sin(omg*real(imax+i)*pi/180e0)+usy(a,u,v)*cos(omg*real(imax+i)*pi/180e0), -abs(s(a,v+1e0))-hz lc 1 lt 1, \
r*sin(u)*cos(v),-r*cos(u)*2e0*(2e0-dc(5,real(i)*0.3e0))-i*2,r*sin(u)*sin(v)+0.15e0*(rand(0)-0.5e0) lc 4 lt 1
}
hz=0.35e0
imax=50
vz=hz/real(imax)
do for [i=1:imax]{
t=real(i)
splot \
usx(a,u,v),usy(a,u,v), abs(s(a,v+1e0))+hz-vz*t lc 1 lt 1, \
dsx(a,u,v),dsy(a,u,v),-abs(s(a,v+1e0))-hz+vz*t lc 1 lt 1
}
#set out
#set terminal wxt enhanced
第5使徒ラミエル2
# Date : 2016/02/11(yyyy/mm/dd)
# Author : sikino
# creative commons, CC-BY 4.0
set terminal wxt solid noraise enhanced
set param
set hidden3d
set size squ
set xr[-10:10]
set yr[-10:10]
set zr[-4:4]
set tr[0:2*pi]
set ticslevel 0
set view equal xyz
set view 65,108,2,1
set xl "x"
set yl "y"
unset key
set ur[0:pi] # theta
set vr[0:2*pi] # phi
set samples 11
set isosamples 13
# +---polygon---+
s1(x)=x-floor(x)
cnp(n,t)=cos(2e0*pi/real(n)*(s1(t/(2e0*pi/real(n))))-pi/real(n))
pc(n,t)=cos(t)*cos(pi/real(n))/cnp(n,t)
ps(n,t)=sin(t)*cos(pi/real(n))/cnp(n,t)
p3x(n,u,v)=ps(n,u)*pc(n,v)
p3y(n,u,v)=ps(n,u)*ps(n,v)
p3z(n,u)=pc(n,u)
# -- trocoid
hcyc(n,h,t)=(real(n-1)*cos(t)+h*cos(t*real(n-1)))/real(n)
hcys(n,h,t)=(real(n-1)*sin(t)-h*sin(t*real(n-1)))/real(n)
hc3x(n,h,u,v)=hcys(n,h,u)*hcyc(n,h,v)
hc3y(n,h,u,v)=hcys(n,h,u)*hcys(n,h,v)
hc3z(n,h,u)=hcyc(n,h,u)
# -- parent infomation
ces=3e0 # parent size
cesr=0.5e0 # size ratio
apt=0.2e0 # parent small velocity
lcp=6 # color of parent
# -- around polygon
cs=0.5e0 # size of child
tcn = 8 # number of child
cr0=4.e0 # distance 0 of child from origin
cr1=8.e0 # distance 1 of child from origin
rv=0.05e0 # rotating velocity of child
n=4 # polygon parameter
a=0.2e0 # expand velocity (equal to "apt" recommanded)
at=1e0 # expand velocity by fth
aw=2 # tail change velocity
ww=3e0 # duration of tail
lw=4e0 # length of tail
lcc=6 # color of child
# -- groundchild infomation
gs=0.5e0 # size of groundchild
hgz=4e0 # height of tail
lcg=6 # color of groundchild
fth(a,x,x0,f0,x1,f1)=(f0-f1)*tanh(a*(real(x)-(x0+x1)*0.5e0))/(tanh(a*(real(x0)-(x0+x1)*0.5e0))-tanh(a*(real(x1)-(x0+x1)*0.5e0)))+(-f0*tanh(a*(real(x1)-(x0+x1)*0.5e0))+f1*tanh(a*(real(x0)-(x0+x1)*0.5e0)))/(tanh(a*(real(x0)-(x0+x1)*0.5e0))-tanh(a*(real(x1)-(x0+x1)*0.5e0)))
# x0,f0 --> x1,f1
fwi(n,r,i,ic)=(real(r)**(2**n))/((real(i-ic))**(2**n)+real(r)**(2**n))
# window function
#set term gif animate delay 4 size 600,400
#set output 'ramiel.gif'
rv0=rv
rvi=rv
i0=0
i1=51
i2=101
i3=151
i4=201
i5=301
i6=401
i7=461
dth=2e0*pi/real(tcn)
thi=0e0
do for [i=i0:i1-1]{
thi=thi+rv
tcx = '' ; tcy = '' ; tcz = '' ; # center of child, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', cr0*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', cr0*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)-sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)+cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
splot for[j=1:tcn] \
cs*fth(a,i,i0,0e0,i1-1,1e0)*rp3x(j,n,u,v)+fth(a,i,i0,0e0,i1-1,1e0)*word(tcx,j),\
cs*fth(a,i,i0,0e0,i1-1,1e0)*rp3y(j,n,u,v)+fth(a,i,i0,0e0,i1-1,1e0)*word(tcy,j),\
cs*fth(a,i,i0,0e0,i1-1,1e0)*rp3z(j,n,u)+fth(a,i,i0,0e0,i1-1,1e0)*word(tcz,j) lc lcc, \
ces*fth(apt,i,i0,1e0,(i1-1),cesr)*rp3x(0,n,u,v),\
ces*fth(apt,i,i0,1e0,(i1-1),cesr)*rp3y(0,n,u,v),\
ces*rp3z(0,n,u) lc lcp
}
do for [i= i1 : i2-1 ]{
thi=thi+rv
tcx = ''; tcy = ''; tcz = ''; # center of child, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', fth(at,i,i1,cr0,i2-1,cr1)*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', fth(at,i,i1,cr0,i2-1,cr1)*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)*( j!=0 & (v<0.5e0*pi || v>1.5*pi) ? 1e0+lw*fwi(aw,ww,i,(i1+i2-1)/2):1e0) -sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)*( j!=0 & (v<0.5e0*pi || v>1.5*pi) ? 1e0+lw*fwi(aw,ww,i,(i1+i2-1)/2):1e0) +cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
splot for[j=1:tcn] \
cs*rp3x(j,n,u,v)+word(tcx,j),\
cs*rp3y(j,n,u,v)+word(tcy,j),\
cs*rp3z(j,n,u)+word(tcz,j) lc lcc, \
ces*fth(apt,i,i1,cesr,i2-1,cesr)*rp3x(0,n,u,v), \
ces*fth(apt,i,i1,cesr,i2-1,cesr)*rp3y(0,n,u,v), \
ces*fth(apt,i,i1,1e0,i2-1,cesr)*rp3z(0,n,u) lc lcp
}
cr2=0e0
rv0=rv
do for [i= i2 : i3-1 ]{
thi=thi+rv
rv=fth(0.1e0,i,i2,rv0,i3-1,rv0*2e0)
tcx = ''; tcy = ''; tcz = ''; # center of child, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', fth(at,i,i2,cr1,i3-1,cr2)*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', fth(at,i,i2,cr1,i3-1,cr2)*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0+lw*fwi(aw,ww,i,(i2+i3-1)/2) : 1e0+lw*fth(aw,i,i2,0e0,i3-1,2.5e0)):1e0) -sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0+lw*fwi(aw,ww,i,(i2+i3-1)/2) : 1e0+lw*fth(aw,i,i2,0e0,i3-1,2.5e0)):1e0) +cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
splot for[j=1:tcn] \
cs*rp3x(j,n,u,v)+word(tcx,j),\
cs*rp3y(j,n,u,v)+word(tcy,j),\
cs*rp3z(j,n,u)+word(tcz,j) lc lcc, \
ces*cesr*rp3x(0,n,u,v), \
ces*cesr*rp3y(0,n,u,v), \
ces*cesr*rp3z(0,n,u) lc lcp
}
rv0=rv
cr3=cr2
larm=4e0
do for [i= i3 : i4-1 ]{
thi=thi+rv
rv=fth(0.1e0,i,i3,rv0,i4-1,rv0*1.5e0)
tcx = ''; tcy = ''; tcz = ''; # center of child, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', fth(at,i,i3,cr2,i4-1,cr3)*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', fth(at,i,i3,cr2,i4-1,cr3)*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+lw*fth(apt,i,i3,2.5e0,i4-1,larm)):1e0) -sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+lw*fth(apt,i,i3,2.5e0,i4-1,larm)):1e0) +cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
splot for[j=1:tcn] \
cs*rp3x(j,n,u,v)+word(tcx,j),\
cs*rp3y(j,n,u,v)+word(tcy,j),\
cs*rp3z(j,n,u)+word(tcz,j) lc lcc, \
ces*cesr*rp3x(0,n,u,v), \
ces*cesr*rp3y(0,n,u,v), \
ces*cesr*rp3z(0,n,u) lc lcp
}
rv0=rv
cr4=cr3
do for [i= i4 : i5-1 ]{
thi=thi+rv
rv=fth(0.1e0,i,i4,rv0,i5-1,rv0*2e0)
tcx = ''; tcy = ''; tcz = ''; # center of child, x,y,z of No.j
tgx = ''; tgy = ''; tgz = ''; # center of groundchild, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', fth(at,i,i4,cr3,i5-1,cr4)*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', fth(at,i,i4,cr3,i5-1,cr4)*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
tgx = tgx . sprintf('%f ', 0.5e0*(1e0+larm*lw+fth(at,i,i4,cr3,i5-1,cr4))*cos(dth*real(j)+thi))
tgy = tgy . sprintf('%f ', 0.5e0*(1e0+larm*lw+fth(at,i,i4,cr3,i5-1,cr4))*sin(dth*real(j)+thi))
tgz = tgz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+larm*lw):1e0) -sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+larm*lw):1e0) +cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
rpgx(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)-sin(thi+dth*j)*p3y(n,u,v)
rpgy(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)+cos(thi+dth*j)*p3y(n,u,v)
rpgz(j,n,u)=p3z(n,u)*( j != 0 ? ((u>0.5e0*pi) ? 1e0+fth(apt,i,i4,0e0,i5-1,hgz):1e0 ):1e0)
splot for[j=1:tcn] \
cs*rp3x(j,n,u,v)+word(tcx,j),\
cs*rp3y(j,n,u,v)+word(tcy,j),\
cs*rp3z(j,n,u)+word(tcz,j) lc lcc,\
for[k=1:tcn] \
gs*fth(a,i,i4,0e0,(i4+i5-1)/2,1e0)*rpgx(k,n,u,v)+word(tgx,k),\
gs*fth(a,i,i4,0e0,(i4+i5-1)/2,1e0)*rpgy(k,n,u,v)+word(tgy,k),\
gs*fth(a,i,i4,0e0,(i4+i5-1)/2,1e0)*rpgz(k,n,u)+word(tgz,k) lc lcg,\
ces*cesr*rp3x(0,n,u,v), \
ces*cesr*rp3y(0,n,u,v), \
ces*cesr*rp3z(0,n,u) lc lcp
}
rv0=rv
cr5=cr4
do for [i= i5 : i6-1 ]{
thi=thi+rv
rv=(i>(i5+i6-1)/2+(i5-i6+1)*3e0/8e0 ? 0e0 : fth(0.2e0,i,i5,rv0,(i5+i6-1)/2+(i5-i6+1)*3e0/8e0,0e0))
tcx = ''; tcy = ''; tcz = ''; # center of child, x,y,z of No.j
tgx = ''; tgy = ''; tgz = ''; # center of groundchild, x,y,z of No.j
do for[j=1:tcn]{
tcx = tcx . sprintf('%f ', fth(at,i,i5,cr4,i6-1,cr5)*cos(dth*real(j)+thi))
tcy = tcy . sprintf('%f ', fth(at,i,i5,cr4,i6-1,cr5)*sin(dth*real(j)+thi))
tcz = tcz . sprintf('%f ', 0e0)
tgx = tgx . sprintf('%f ', 0.5e0*(1e0+larm*lw+fth(at,i,i5,cr4,i6-1,cr5))*cos(dth*real(j)+thi))
tgy = tgy . sprintf('%f ', 0.5e0*(1e0+larm*lw+fth(at,i,i5,cr4,i6-1,cr5))*sin(dth*real(j)+thi))
tgz = tgz . sprintf('%f ', 0e0)
}
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+larm*lw):1e0) -sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)*( j != 0 ? ((v>0.5e0*pi & v<1.5*pi) ? 1e0:1e0+larm*lw):1e0) +cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
rpgx(j,n,u,v)=cos(thi+dth*real(j))*p3x(n,u,v)-sin(thi+dth*real(j))*p3y(n,u,v)
rpgy(j,n,u,v)=sin(thi+dth*real(j))*p3x(n,u,v)+cos(thi+dth*real(j))*p3y(n,u,v)
rpgz(j,n,u)=p3z(n,u)*( j != 0 ? ((u>0.5e0*pi) ? 1e0+fth(apt,i,i5,hgz,(i5+i6-1)/2,0e0):1e0 ):1e0)
if(i <= (i5+i6-1)/2){
splot for[j=1:tcn] \
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3x(j,n,u,v)+word(tcx,j),\
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3y(j,n,u,v)+word(tcy,j),\
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3z(j,n,u)+word(tcz,j) lc lcc,\
for[k=1:tcn] \
gs*fth(0.05e0,i,i5,1e0,(i5+i6-1)/2,0e0)*rpgx(k,n,u,v)+word(tgx,k),\
gs*fth(0.05e0,i,i5,1e0,(i5+i6-1)/2,0e0)*rpgy(k,n,u,v)+word(tgy,k),\
gs*fth(0.05e0,i,i5,1e0,(i5+i6-1)/2,0e0)*rpgz(k,n,u)+word(tgz,k) lc lcg,\
ces*cesr*rp3x(0,n,u,v), \
ces*cesr*rp3y(0,n,u,v), \
ces*cesr*rp3z(0,n,u) lc lcp
} else {
splot for[j=1:tcn] \
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3x(j,n,u,v)+word(tcx,j),\
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3y(j,n,u,v)+word(tcy,j),\
cs*fth(a,i,i5,1e0,(i6-1),0e0)*rp3z(j,n,u)+word(tcz,j) lc lcc,\
ces*cesr*rp3x(0,n,u,v), \
ces*cesr*rp3y(0,n,u,v), \
ces*cesr*rp3z(0,n,u) lc lcp
}
}
nmax=11
do for [i= 0 : 2*nmax ]{
n=4+(0.5e0*i)
rp3x(j,n,u,v)=cos(thi+dth*j)*p3x(n,u,v)-sin(thi+dth*j)*p3y(n,u,v)
rp3y(j,n,u,v)=sin(thi+dth*j)*p3x(n,u,v)+cos(thi+dth*j)*p3y(n,u,v)
rp3z(j,n,u)=p3z(n,u)
splot ces*fth(0.4e0,n,4,cesr,nmax,1e0)*rp3x(0,n,u,v), \
ces*fth(0.4e0,n,4,cesr,nmax,1e0)*rp3y(0,n,u,v), \
ces*fth(0.4e0,n,4,cesr,nmax,1e0)*rp3z(0,n,u) lc lcp
pause 0.04
}
do for [i= 2*nmax : 1 : -1 ]{
n=5+(0.5e0*i)
thi=fth(0.2e0,i,2*nmax,0e0,0,2e0*pi/3e0)
rp3x(n,u,v)=p3x(n,u,v)
rp3y(n,u,v)=cos(thi)*p3y(n,u,v)-sin(thi)*p3z(n,u)
rp3z(n,u,v)=sin(thi)*p3y(n,u,v)+cos(thi)*p3z(n,u)
splot ces*rp3x(n,u,v), \
ces*rp3y(n,u,v), \
ces*rp3z(n,u,v) lc lcp
pause 0.04
}
set isosamples 5*3+1
do for [i= 0 : 10]{
splot ces*rp3x(n,u,v), \
ces*rp3y(n,u,v), \
ces*rp3z(n,u,v) lc lcp, \
0e0,0e0,0e0
}
set isosamples 13
do for [i= 0 : 2*nmax ]{
n=5+(0.5e0*i)
thi=fth(0.2e0,i,0,2e0*pi/3e0,2*nmax,2e0*pi)
rp3x(n,u,v)=p3x(n,u,v)
rp3y(n,u,v)=cos(thi)*p3y(n,u,v)-sin(thi)*p3z(n,u)
rp3z(n,u,v)=sin(thi)*p3y(n,u,v)+cos(thi)*p3z(n,u)
splot ces*rp3x(n,u,v), \
ces*rp3y(n,u,v), \
ces*rp3z(n,u,v) lc lcp
pause 0.04
}
do for [i= 4*nmax : 0 :-1]{
n=3+(0.5e0*i)
thi=fth(0.1e0,i,4*nmax,0e0,0,0e0)
h=1e0
rh3x(n,h,u,v)=hc3x(n,h,u,v)
rh3y(n,h,u,v)=cos(thi)*hc3y(n,h,u,v)-sin(thi)*hc3z(n,h,u)
rh3z(n,h,u,v)=sin(thi)*hc3y(n,h,u,v)+cos(thi)*hc3z(n,h,u)
splot ces*rh3x(n,h,u,v), \
ces*rh3y(n,h,u,v), \
ces*rh3z(n,h,u,v) lc lcp
pause 0.04
}
n=4
splot ces*hc3x(n,h,u,v), \
ces*hc3y(n,h,u,v), \
ces*hc3z(n,h,u) lc lcp
do for [i= 0 : 10]{
n=4
h=1e0
splot ces*(hc3x(n,h,u,v)*fth(0.1e0,i,0,1e0,10,0e0)+p3x(n,u,v)*fth(0.1e0,i,0,0e0,10,1e0)), \
ces*(hc3y(n,h,u,v)*fth(0.1e0,i,0,1e0,10,0e0)+p3y(n,u,v)*fth(0.1e0,i,0,0e0,10,1e0)), \
ces*(hc3z(n,h,u)*fth(0.1e0,i,0,1e0,10,0e0)+p3z(n,u)*fth(0.1e0,i,0,0e0,10,1e0)) lc 6
pause 0.04
}
do for [i= 0 : 10]{
splot ces*p3x(n,u,v), \
ces*p3y(n,u,v), \
ces*p3z(n,u) lc lcp
replot 0e0,0e0,0e0
}
#set out
#set terminal wxt enhanced
魔貫光殺砲
set linetype 2 lc rgb "#009e73" lw 1
set linetype 3 lc rgb "#56b4e9" lw 1
set linetype 4 lc rgb "#ffd700" lw 1
set linetype 5 lc rgb "#f0e442" lw 1
set linetype 6 lc rgb "#0072b2" lw 1
set linetype 7 lc rgb "#e51e10" lw 1
set linetype 8 lc rgb "#black" lw 1
set hidden3d back offset 8 trianglepattern 3 undefined 1 altdiagonal bentover
set param
set ur[0:1]
set vr[0:1]
set xr[0:30]
set yr[-2.2:2.2]
set zr[-2.2:2.2]
set view 80,58,4,1
r0=0.5e0 # size of inner ray
r1=1.5e0 # position of outer ray
r2=0.2e0 # size of outer ray
rrate=8e0 # rotation rate of outer ray
xran=30e0 # length of ray
i0=1 # initial time
i1=100 # finial time
th(x)=2e0*pi*x
fl(x,x0,y0,x1,y1)=real(x)*real(y1-y0)/real(x1-x0)+real(x1*y0-x0*y1)/real(x1-x0)
#set term gif animate optimize delay 4 size 600,400
#set output 'orbit.gif'
do for[i=i0:i1:3]{
set isosamples i+10,15
splot u*xran*fl(i,i0,0e0,i1,1e0),r0*cos(th(v)),r0*sin(th(v)) lt 1 lc 4,\
u*xran*fl(i,i0,0e0,i1,1e0),r1*cos(rrate*th(u)*fl(i,i0,0e0,i1,1e0))+r2*cos(th(v)),r1*sin(rrate*th(u)*fl(i,i0,0e0,i1,1e0))+r2*sin(th(v)) lt 1 lc 4
}
#set out
#set terminal wxt enhanced
マリオ
マリオのグラフは↓から。
Mario like curve -wolfram alpha
set parametric
set ticslevel 0
set view equal xy
set hidden3d
set zr[0:4]
set xr[-2:2]
set yr[-2:2]
set ur[0:1]
set vr[0:1]
ratio=1e0
r0=1e0
dx(u,v)=r0*cos(v*2e0*pi)
dy(u,v)=r0*sin(v*2e0*pi)
dz(u)=u*0.5e0+ratio
r1=0.8e0
dx2(u,v)=r1*cos(v*2e0*pi)
dy2(u,v)=r1*sin(v*2e0*pi)
dz2(u)=u*ratio
set isosamples 20,20
set table "pipe.d"
splot dx(u,v),dy(u,v),dz(u)
unset table
set table "pipe2.d"
splot dx2(u,v),dy2(u,v),dz2(u)
unset table
scl=0.0009e0
theta(x) = x<=0e0 ? 0e0 : 1e0
x(t) = ((-7e0/48e0*sin(10e0/11-14e0*t)+2540e0/7e0*sin(t+49e0/29)+809e0/23e0*sin(2e0*t+25e0/13)+285e0/31e0*sin(3e0*t+177e0/106)+91e0/8e0*sin(4e0*t+70e0/29)+103e0/23e0*sin(5e0*t+44e0/27)+40e0/11e0*sin(6e0*t+140e0/37)+16e0/3e0*sin(7e0*t+33e0/16)+30e0/11e0*sin(8e0*t+60e0/13)+227e0/85e0*sin(9e0*t+91e0/44)+110e0/47e0*sin(10e0*t+26e0/7)+29e0/22e0*sin(11e0*t+45e0/37)+52e0/33e0*sin(12e0*t+89e0/24)+14e0/25e0*sin(13e0*t+135e0/52)+56e0/41e0*sin(15e0*t+122e0/35)+4e0/21e0*sin(16e0*t+208e0/89)+149e0/20)*theta(95e0*pi-t)*theta(t-91e0*pi)+(-46e0/19e0*sin(14e0/25-2e0*t)+264e0/23e0*sin(t+1e0/10)+125e0/29e0*sin(3e0*t+11e0/25)+85e0/23e0*sin(4e0*t+72e0/23)+122e0/43e0*sin(5e0*t+15e0/23)+377e0/32e0*sin(6e0*t+83e0/18)+169e0/24e0*sin(7e0*t+42e0/23)+52e0/15e0*sin(8e0*t+37e0/33)+407e0/27e0*sin(9e0*t+27e0/29)+35e0/8e0*sin(10e0*t+55e0/31)+33e0/17e0*sin(11e0*t+109e0/29)+193e0/46e0*sin(12e0*t+13e0/16)-10560e0/59)*theta(91e0*pi-t)*theta(t-87e0*pi)+(-19e0/24e0*sin(9e0/19-11e0*t)-139e0/29e0*sin(11e0/26-9e0*t)-103e0/6e0*sin(21e0/20-6e0*t)-785e0/112e0*sin(8e0/15-2e0*t)+75e0/34e0*sin(t+14e0/33)+79e0/38e0*sin(3e0*t+27e0/46)+313e0/87e0*sin(4e0*t+17e0/24)+65e0/22e0*sin(5e0*t+152e0/35)+266e0/71e0*sin(7e0*t+139e0/44)+118e0/45e0*sin(8e0*t+117e0/28)+23e0/19e0*sin(10e0*t+64e0/33)+82e0/33e0*sin(12e0*t+75e0/31)+1527e0/13)*theta(87e0*pi-t)*theta(t-83e0*pi)+(-44e0/21e0*sin(3e0/8-9e0*t)-1370e0/457e0*sin(43e0/47-8e0*t)-173e0/20e0*sin(13e0/32-5e0*t)+7375e0/42e0*sin(t+1653e0/826)+3902e0/53e0*sin(2e0*t+49e0/37)+3229e0/190e0*sin(3e0*t+211e0/66)+127e0/13e0*sin(4e0*t+181e0/63)+1169e0/292e0*sin(6e0*t+97e0/35)+35e0/24e0*sin(7e0*t+261e0/112)+53e0/17e0*sin(10e0*t+43e0/13)+123e0/29e0*sin(11e0*t+3e0/17)+80e0/29e0*sin(12e0*t+36e0/11)+16667e0/36)*theta(83e0*pi-t)*theta(t-79e0*pi)+(-22e0/15e0*sin(5e0/16-11e0*t)-1244e0/113e0*sin(27e0/20-5e0*t)-127e0/15e0*sin(1e0/7-4e0*t)-261e0/10e0*sin(15e0/16-2e0*t)+1657e0/20e0*sin(t+167e0/41)+292e0/23e0*sin(3e0*t+66e0/17)+234e0/31e0*sin(6e0*t+266e0/69)+173e0/27e0*sin(7e0*t+73e0/16)+111e0/29e0*sin(8e0*t+71e0/28)+31e0/13e0*sin(9e0*t+85e0/32)+3e0/4e0*sin(10e0*t+236e0/51)+21e0/23e0*sin(12e0*t+106e0/23)-19200e0/37)*theta(79e0*pi-t)*theta(t-75e0*pi)+(-34e0/41e0*sin(42e0/37-12e0*t)+7208e0/61e0*sin(t+139e0/93)+195e0/23e0*sin(2e0*t+91e0/33)+86e0/11e0*sin(3e0*t+65e0/33)+79e0/27e0*sin(4e0*t+199e0/99)+253e0/28e0*sin(5e0*t+47e0/33)+43e0/33e0*sin(6e0*t+7e0/2)+107e0/30e0*sin(7e0*t+73e0/61)+21e0/31e0*sin(8e0*t+120e0/37)+68e0/35e0*sin(9e0*t+34e0/21)+15e0/53e0*sin(10e0*t+68e0/21)+104e0/41e0*sin(11e0*t+29e0/40)+29e0/40e0*sin(13e0*t+23e0/19)+16e0/45e0*sin(14e0*t+155e0/37)+9e0/14e0*sin(15e0*t+435e0/218)-277e0/35)*theta(75e0*pi-t)*theta(t-71e0*pi)+(1826e0/43e0*sin(t+49e0/59)+232e0/65e0*sin(2e0*t+25e0/34)+11627e0/31)*theta(71e0*pi-t)*theta(t-67e0*pi)+(1241e0/19e0*sin(t+69e0/59)+214e0/71e0*sin(2e0*t+31e0/23)+64e0/35e0*sin(3e0*t+56e0/13)+61e0/27e0*sin(4e0*t+62e0/53)+1062e0/29)*theta(67e0*pi-t)*theta(t-63e0*pi)+(12307e0/142e0*sin(t+7e0/6)+227e0/31e0*sin(2e0*t+129e0/28)+355e0/32e0*sin(3e0*t+46e0/43)+109e0/33e0*sin(4e0*t+136e0/37)+85e0/21e0*sin(5e0*t+27e0/34)+135e0/41e0*sin(6e0*t+71e0/20)+90e0/41e0*sin(7e0*t+26e0/27)+83e0/36e0*sin(8e0*t+83e0/25)+34e0/23e0*sin(9e0*t+17e0/21)+25e0/13e0*sin(10e0*t+107e0/34)+13e0/18e0*sin(11e0*t+17e0/24)+49e0/27e0*sin(12e0*t+60e0/19)+324)*theta(63e0*pi-t)*theta(t-59e0*pi)+(-18e0/23e0*sin(17e0/11-12e0*t)-16e0/19e0*sin(6e0/29-9e0*t)-4e0/13e0*sin(26e0/17-7e0*t)-250e0/51e0*sin(77e0/54-6e0*t)-206e0/27e0*sin(26e0/51-4e0*t)-49e0/2e0*sin(16e0/31-2e0*t)+3718e0/23e0*sin(t+10e0/9)+199e0/8e0*sin(3e0*t+25e0/21)+245e0/29e0*sin(5e0*t+58e0/49)+55e0/13e0*sin(8e0*t+178e0/41)+118e0/47e0*sin(10e0*t+73e0/16)+19e0/16e0*sin(11e0*t+437e0/438)+26e0/37e0*sin(13e0*t+22e0/15)+26e0/41e0*sin(14e0*t+45e0/11)+1e0/26e0*sin(15e0*t+65e0/54)-128e0/3)*theta(59e0*pi-t)*theta(t-55e0*pi)+(-56e0/9e0*sin(17e0/35-26e0*t)-171e0/44e0*sin(29e0/26-23e0*t)-98e0/25e0*sin(29e0/26-19e0*t)-224e0/23e0*sin(34e0/61-12e0*t)-6397e0/43e0*sin(15e0/19-7e0*t)-737e0/13e0*sin(33e0/49-6e0*t)-764e0/27e0*sin(15e0/14-2e0*t)+13798e0/35e0*sin(t+77e0/38)+3989e0/20e0*sin(3e0*t+1e0/84)+356e0/19e0*sin(4e0*t+55e0/26)+2183e0/30e0*sin(5e0*t+255e0/56)+442e0/21e0*sin(8e0*t+82e0/33)+1092e0/43e0*sin(9e0*t+33e0/46)+587e0/52e0*sin(10e0*t+4e0/19)+174e0/5e0*sin(11e0*t+65e0/21)+1411e0/94e0*sin(13e0*t+73e0/20)+129e0/13e0*sin(14e0*t+5e0/4)+231e0/29e0*sin(15e0*t+2e0/29)+149e0/15e0*sin(16e0*t+45e0/16)+519e0/67e0*sin(17e0*t+73e0/19)+73e0/53e0*sin(18e0*t+71e0/16)+153e0/53e0*sin(20e0*t+4)+283e0/41e0*sin(21e0*t+3e0/26)+73e0/23e0*sin(22e0*t+31e0/18)+87e0/22e0*sin(24e0*t+5e0/33)+190e0/29e0*sin(25e0*t+27e0/7)+57e0/16e0*sin(27e0*t+3e0/2)+151e0/39e0*sin(28e0*t+1190e0/397)+199e0/50e0*sin(29e0*t+26e0/33)-5967e0/56)*theta(55e0*pi-t)*theta(t-51e0*pi)+(-6e0/35e0*sin(13e0/18-11e0*t)-9e0/13e0*sin(9e0/23-9e0*t)-47e0/34e0*sin(23e0/29-7e0*t)-98e0/37e0*sin(37e0/32-5e0*t)-115e0/14e0*sin(44e0/41-3e0*t)-39e0/41e0*sin(15e0/23-2e0*t)-2179e0/21e0*sin(48e0/35-t)+23e0/25e0*sin(4e0*t+7e0/12)+41e0/37e0*sin(6e0*t+43e0/31)+24e0/25e0*sin(8e0*t+59e0/30)+15e0/19e0*sin(10e0*t+45e0/19)+62e0/123e0*sin(12e0*t+39e0/16)-9717e0/53)*theta(51e0*pi-t)*theta(t-47e0*pi)+(2617e0/50e0*sin(t+59e0/46)+101e0/40e0*sin(2e0*t+55e0/24)+64e0/17e0*sin(3e0*t+135e0/32)+28e0/45e0*sin(4e0*t+18e0/17)+6361e0/49)*theta(47e0*pi-t)*theta(t-43e0*pi)+(2662e0/35e0*sin(t+25e0/29)+71e0/13e0*sin(2e0*t+52e0/25)+219e0/41e0*sin(3e0*t+121e0/35)+53e0/19e0*sin(4e0*t+20e0/29)+73e0/26e0*sin(5e0*t+52e0/17)+3923e0/28)*theta(43e0*pi-t)*theta(t-39e0*pi)+(-22e0/21e0*sin(22e0/51-4e0*t)+1408e0/19e0*sin(t+23e0/21)+48e0/29e0*sin(2e0*t+40e0/31)+33e0/19e0*sin(3e0*t+95e0/23)+18e0/31e0*sin(5e0*t+33e0/14)-6441e0/35)*theta(39e0*pi-t)*theta(t-35e0*pi)+(1659e0/17e0*sin(t+24e0/41)+59e0/17e0*sin(2e0*t+15e0/29)+48e0/11e0*sin(3e0*t+80e0/31)+2e0/25e0*sin(4e0*t+80e0/159)-5771e0/31)*theta(35e0*pi-t)*theta(t-31e0*pi)+(-132e0/41e0*sin(3e0/37-12e0*t)-123e0/40e0*sin(47e0/31-7e0*t)-63e0/11e0*sin(49e0/32-5e0*t)-130e0/7e0*sin(12e0/13-2e0*t)+7294e0/15e0*sin(t+41e0/39)+816e0/43e0*sin(3e0*t+5e0/21)+299e0/24e0*sin(4e0*t+103e0/36)+59e0/8e0*sin(6e0*t+19e0/21)+67e0/45e0*sin(8e0*t+7e0/38)+75e0/13e0*sin(9e0*t+155e0/36)+41e0/10e0*sin(10e0*t+38e0/53)+67e0/18e0*sin(11e0*t+42e0/13)-2071e0/13)*theta(31e0*pi-t)*theta(t-27e0*pi)+(-769e0/71e0*sin(1e0/91-13e0*t)-365e0/21e0*sin(43e0/31-12e0*t)-1033e0/53e0*sin(22e0/35-7e0*t)-1459e0/29e0*sin(15e0/29-6e0*t)-1023e0/14e0*sin(16e0/11-4e0*t)-685e0/8e0*sin(37e0/30-t)+1145e0/13e0*sin(2e0*t+61e0/39)+382e0/27e0*sin(3e0*t+55e0/16)+3185e0/54e0*sin(5e0*t+25e0/22)+1485e0/31e0*sin(8e0*t+409e0/102)+809e0/41e0*sin(9e0*t+77e0/24)+816e0/53e0*sin(10e0*t+78e0/19)+197e0/23e0*sin(11e0*t+269e0/62)+104e0/19e0*sin(14e0*t+15e0/41)+245e0/37e0*sin(15e0*t+109e0/54)+120e0/29e0*sin(16e0*t+45e0/28)+112e0/27e0*sin(17e0*t+17e0/31)+13e0/9e0*sin(18e0*t+13e0/16)+159e0/40e0*sin(19e0*t+47e0/24)+17e0/26e0*sin(20e0*t+116e0/35)+53e0/12e0*sin(21e0*t+42e0/83)+56774e0/117)*theta(27e0*pi-t)*theta(t-23e0*pi)+(-27e0/17e0*sin(39e0/40-19e0*t)-76e0/29e0*sin(682e0/681-11e0*t)-179e0/9e0*sin(29e0/27-5e0*t)-3509e0/28e0*sin(29e0/23-2e0*t)-2092e0/17e0*sin(10e0/23-t)+3427e0/39e0*sin(3e0*t+13e0/14)+1106e0/41e0*sin(4e0*t+111e0/29)+336e0/23e0*sin(6e0*t+127e0/35)+1051e0/73e0*sin(7e0*t+51e0/26)+203e0/32e0*sin(8e0*t+37e0/31)+37e0/5e0*sin(9e0*t+13e0/43)+121e0/19e0*sin(10e0*t+19e0/10)+249e0/125e0*sin(12e0*t+100e0/31)+17e0/40e0*sin(13e0*t+83e0/69)+101e0/37e0*sin(14e0*t+159e0/68)+51e0/28e0*sin(15e0*t+14e0/19)+20e0/9e0*sin(16e0*t+19e0/28)+19e0/24e0*sin(17e0*t+123e0/47)+11e0/13e0*sin(18e0*t+50e0/151)+25e0/38e0*sin(20e0*t+22e0/17)-23965e0/43)*theta(23e0*pi-t)*theta(t-19e0*pi)+(-46e0/39e0*sin(11e0/27-3e0*t)+3379e0/18e0*sin(t+47e0/32)+153e0/19e0*sin(2e0*t+54e0/35)+327e0/77e0*sin(4e0*t+21e0/17)+104e0/33e0*sin(5e0*t+118e0/29)+100e0/29e0*sin(6e0*t+31e0/33)+118e0/41e0*sin(7e0*t+124e0/33)+5455e0/101)*theta(19e0*pi-t)*theta(t-15e0*pi)+(-37e0/21e0*sin(13e0/40-15e0*t)-67e0/33e0*sin(10e0/13-12e0*t)-869e0/290e0*sin(4e0/3-11e0*t)-388e0/31e0*sin(109e0/78-5e0*t)-411e0/38e0*sin(14e0/25-3e0*t)+6756e0/23e0*sin(t+70e0/93)+725e0/31e0*sin(2e0*t+190e0/69)+573e0/46e0*sin(4e0*t+43e0/40)+56e0/45e0*sin(6e0*t+81e0/35)+31e0/9e0*sin(7e0*t+142e0/43)+72e0/35e0*sin(8e0*t+32e0/23)+61e0/11e0*sin(9e0*t+9e0/13)+25e0/31e0*sin(10e0*t+13e0/48)+85e0/29e0*sin(13e0*t+29e0/24)+22e0/25e0*sin(14e0*t+21e0/29)+35e0/27e0*sin(16e0*t+12e0/73)+9e0/7e0*sin(17e0*t+77e0/19)+6e0/37e0*sin(18e0*t+73e0/18)+909e0/34)*theta(15e0*pi-t)*theta(t-11e0*pi)+(20189e0/113e0*sin(t+207e0/52)+201e0/25e0*sin(2e0*t+21e0/26)+180e0/47e0*sin(3e0*t+159e0/50)+158e0/41e0*sin(4e0*t+2e0/35)-1106e0/47)*theta(11e0*pi-t)*theta(t-7e0*pi)+(-39e0/68e0*sin(7e0/12-12e0*t)-1e0/2e0*sin(70e0/69-10e0*t)-905e0/78e0*sin(9e0/22-5e0*t)-822e0/23e0*sin(20e0/23-3e0*t)-14600e0/43e0*sin(55e0/41-t)+9e0/11e0*sin(2e0*t+37e0/15)+24e0/71e0*sin(4e0*t+173e0/65)+1e0/3e0*sin(6e0*t+133e0/37)+436e0/83e0*sin(7e0*t+3e0/40)+11e0/37e0*sin(8e0*t+159e0/35)+79e0/26e0*sin(9e0*t+28e0/47)+88e0/49e0*sin(11e0*t+49e0/44)-3013e0/35)*theta(7e0*pi-t)*theta(t-3e0*pi)+(-291e0/13e0*sin(20e0/23-3e0*t)-703e0/33e0*sin(1e0/517-2e0*t)+18020e0/37e0*sin(t+50e0/57)+122e0/23e0*sin(4e0*t+59e0/18)+318e0/35e0*sin(5e0*t+169e0/46)+115e0/22e0*sin(6e0*t+59e0/35)+68e0/39e0*sin(7e0*t+79e0/31)+161e0/37e0*sin(8e0*t+17e0/22)+107e0/33e0*sin(9e0*t+143e0/31)+34e0/25e0*sin(10e0*t+41e0/42)+84e0/37e0*sin(11e0*t+269e0/67)+65e0/42e0*sin(12e0*t+390e0/389)-4625e0/29)*theta(3e0*pi-t)*theta(t+pi))*theta(sqrt(sgn(sin(t/2))))
y(t) = ((-191e0/106e0*sin(10e0/9-9e0*t)+2661e0/67e0*sin(t+25e0/28)+3358e0/101e0*sin(2e0*t+35e0/16)+1875e0/32e0*sin(3e0*t+39e0/25)+535e0/29e0*sin(4e0*t+216e0/47)+477e0/17e0*sin(5e0*t+41e0/25)+133e0/39e0*sin(6e0*t+51e0/13)+119e0/20e0*sin(7e0*t+22e0/13)+265e0/43e0*sin(8e0*t+93e0/47)+91e0/18e0*sin(10e0*t+62e0/27)+102e0/73e0*sin(11e0*t+35e0/36)+81e0/101e0*sin(12e0*t+38e0/11)+134e0/37e0*sin(13e0*t+117e0/50)+17e0/25e0*sin(14e0*t+51e0/11)+19e0/11e0*sin(15e0*t+56e0/23)+43e0/38e0*sin(16e0*t+175e0/117)-8893e0/19)*theta(95e0*pi-t)*theta(t-91e0*pi)+(-237e0/35e0*sin(21e0/22-11e0*t)-2723e0/190e0*sin(5e0/36-6e0*t)-37e0/18e0*sin(23e0/26-2e0*t)+290e0/23e0*sin(t+83e0/39)+215e0/41e0*sin(3e0*t+66e0/23)+207e0/50e0*sin(4e0*t+131e0/34)+113e0/20e0*sin(5e0*t+39e0/41)+43e0/5e0*sin(7e0*t+48e0/13)+308e0/67e0*sin(8e0*t+71e0/29)+105e0/4e0*sin(9e0*t+79e0/32)+273e0/34e0*sin(10e0*t+43e0/14)+209e0/25e0*sin(12e0*t+45e0/19)+17847e0/29)*theta(91e0*pi-t)*theta(t-87e0*pi)+(-267e0/37e0*sin(15e0/28-7e0*t)-206e0/29e0*sin(10e0/27-5e0*t)-287e0/34e0*sin(1e0/11-t)+193e0/37e0*sin(2e0*t+37e0/22)+309e0/50e0*sin(3e0*t+47e0/21)+671e0/67e0*sin(4e0*t+38e0/11)+753e0/25e0*sin(6e0*t+16e0/33)+75e0/41e0*sin(8e0*t+52e0/21)+156e0/35e0*sin(9e0*t+11e0/20)+123e0/37e0*sin(10e0*t+38e0/11)+115e0/33e0*sin(11e0*t+20e0/33)+31e0/11e0*sin(12e0*t+28e0/9)+12552e0/19)*theta(87e0*pi-t)*theta(t-83e0*pi)+(-77e0/38e0*sin(17e0/59-12e0*t)-105e0/29e0*sin(18e0/25-10e0*t)-407e0/29e0*sin(28e0/25-3e0*t)+8407e0/97e0*sin(t+177e0/46)+819e0/11e0*sin(2e0*t+51e0/22)+265e0/19e0*sin(4e0*t+59e0/33)+626e0/29e0*sin(5e0*t+44e0/13)+1811e0/151e0*sin(6e0*t+137e0/30)+83e0/18e0*sin(7e0*t+22e0/17)+124e0/71e0*sin(8e0*t+73e0/20)+127e0/31e0*sin(9e0*t+21e0/5)+99e0/38e0*sin(11e0*t+21e0/19)+1976e0/9)*theta(83e0*pi-t)*theta(t-79e0*pi)+(-37e0/29e0*sin(4e0/25-11e0*t)-103e0/44e0*sin(30e0/59-7e0*t)-148e0/49e0*sin(63e0/62-5e0*t)-1089e0/19e0*sin(34e0/39-t)+6598e0/91e0*sin(2e0*t+65e0/38)+176e0/29e0*sin(3e0*t+17e0/27)+184e0/37e0*sin(4e0*t+123e0/38)+103e0/15e0*sin(6e0*t+11e0/37)+106e0/25e0*sin(8e0*t+159e0/44)+15e0/4e0*sin(9e0*t+89e0/22)+83e0/24e0*sin(10e0*t+35e0/32)+41e0/22e0*sin(12e0*t+119e0/30)+15729e0/29)*theta(79e0*pi-t)*theta(t-75e0*pi)+(-119e0/46e0*sin(132e0/131-11e0*t)+1189e0/25e0*sin(t+79e0/27)+877e0/17e0*sin(2e0*t+130e0/29)+734e0/37e0*sin(3e0*t+43e0/15)+355e0/22e0*sin(4e0*t+526e0/117)+17e0/3e0*sin(5e0*t+145e0/72)+303e0/22e0*sin(6e0*t+25e0/21)+89e0/52e0*sin(7e0*t+99e0/26)+24e0/5e0*sin(8e0*t+58e0/13)+79e0/45e0*sin(9e0*t+67e0/30)+77e0/32e0*sin(10e0*t+3e0/5)+28e0/65e0*sin(12e0*t+27e0/53)+19e0/29e0*sin(13e0*t+80e0/21)+58e0/49e0*sin(14e0*t+51e0/14)+11e0/24e0*sin(15e0*t+71e0/28)+34459e0/33)*theta(75e0*pi-t)*theta(t-71e0*pi)+(-78e0/77e0*sin(10e0/11-2e0*t)-4118e0/79e0*sin(37e0/33-t)-1199e0/39)*theta(71e0*pi-t)*theta(t-67e0*pi)+(-3e0/2e0*sin(13e0/24-4e0*t)-73e0/27e0*sin(17e0/21-3e0*t)-31e0/12e0*sin(6e0/5-2e0*t)-626e0/11e0*sin(7e0/13-t)-8873e0/39)*theta(67e0*pi-t)*theta(t-63e0*pi)+(-28e0/17e0*sin(13e0/29-11e0*t)-96e0/43e0*sin(25e0/74-9e0*t)-157e0/48e0*sin(11e0/27-7e0*t)-229e0/37e0*sin(13e0/20-5e0*t)-479e0/33e0*sin(19e0/20-3e0*t)-70e0/27e0*sin(65e0/49-2e0*t)-7049e0/52e0*sin(35e0/27-t)+19e0/15e0*sin(4e0*t+90e0/37)+64e0/41e0*sin(6e0*t+91e0/33)+27e0/20e0*sin(8e0*t+55e0/21)+83e0/62e0*sin(10e0*t+31e0/12)+25e0/18e0*sin(12e0*t+64e0/23)+520e0/23)*theta(63e0*pi-t)*theta(t-59e0*pi)+(-7e0/10e0*sin(7e0/43-9e0*t)-16e0/23e0*sin(37e0/51-5e0*t)-94e0/9e0*sin(16e0/19-3e0*t)-401e0/29e0*sin(2e0/35-2e0*t)-5189e0/23e0*sin(24e0/19-t)+205e0/31e0*sin(4e0*t+45e0/58)+103e0/41e0*sin(6e0*t+24e0/17)+133e0/67e0*sin(7e0*t+76e0/17)+73e0/37e0*sin(8e0*t+83e0/36)+51e0/44e0*sin(10e0*t+30e0/17)+49e0/44e0*sin(11e0*t+76e0/59)+8e0/5e0*sin(12e0*t+43e0/32)+23e0/52e0*sin(13e0*t+147e0/88)+sin(14e0*t+97e0/58)+6e0/19e0*sin(15e0*t+61e0/14)-615e0/7)*theta(59e0*pi-t)*theta(t-55e0*pi)+(-32e0/27e0*sin(50e0/51-25e0*t)-354e0/31e0*sin(2e0/13-24e0*t)-149e0/28e0*sin(15e0/13-21e0*t)-501e0/26e0*sin(12e0/35-18e0*t)-113e0/14e0*sin(44e0/31-17e0*t)-1063e0/80e0*sin(10e0/23-16e0*t)-854e0/39e0*sin(33e0/50-15e0*t)-2097e0/20e0*sin(27e0/31-3e0*t)+16563e0/34e0*sin(t+115e0/32)+10150e0/51e0*sin(2e0*t+11e0/20)+691e0/28e0*sin(4e0*t+104e0/49)+5699e0/35e0*sin(5e0*t+129e0/31)+463e0/10e0*sin(6e0*t+37e0/20)+432e0/17e0*sin(7e0*t+52e0/105)+706e0/25e0*sin(8e0*t+19e0/14)+1093e0/15e0*sin(9e0*t+91e0/25)+298e0/41e0*sin(10e0*t+41e0/24)+1123e0/24e0*sin(11e0*t+83e0/30)+2189e0/134e0*sin(12e0*t+202e0/55)+421e0/24e0*sin(13e0*t+63e0/20)+198e0/23e0*sin(14e0*t+37e0/25)+167e0/13e0*sin(19e0*t+257e0/79)+89e0/24e0*sin(20e0*t+13e0/6)+115e0/17e0*sin(22e0*t+1e0/24)+491e0/82e0*sin(23e0*t+59e0/15)+88e0/19e0*sin(26e0*t+23e0/21)+45e0/14e0*sin(27e0*t+66e0/25)+259e0/43e0*sin(28e0*t+19e0/41)+145e0/72e0*sin(29e0*t+27e0/14)-15675e0/23)*theta(55e0*pi-t)*theta(t-51e0*pi)+(-329e0/72e0*sin(15e0/26-4e0*t)-122e0/7e0*sin(19e0/13-2e0*t)+757e0/33e0*sin(t+13e0/45)+265e0/37e0*sin(3e0*t+23e0/36)+101e0/32e0*sin(5e0*t+46e0/55)+41e0/27e0*sin(6e0*t+35e0/88)+39e0/23e0*sin(7e0*t+16e0/17)+18e0/31e0*sin(8e0*t+77e0/24)+7e0/6e0*sin(9e0*t+12e0/11)+2e0/13e0*sin(10e0*t+53e0/14)+11e0/24e0*sin(11e0*t+38e0/33)+7e0/22e0*sin(12e0*t+59e0/16)+139393e0/201)*theta(51e0*pi-t)*theta(t-47e0*pi)+(-1790e0/23e0*sin(7e0/33-t)+25e0/21e0*sin(2e0*t+186e0/41)+128e0/29e0*sin(3e0*t+125e0/48)+53e0/46e0*sin(4e0*t+16e0/27)+36850e0/57)*theta(47e0*pi-t)*theta(t-43e0*pi)+(-67e0/13e0*sin(24e0/37-4e0*t)-47e0/24e0*sin(4e0/17-3e0*t)-1093e0/12e0*sin(24e0/29-t)+1968e0/281e0*sin(2e0*t+100e0/23)+89e0/78e0*sin(5e0*t+41e0/28)+19528e0/31)*theta(43e0*pi-t)*theta(t-39e0*pi)+(-35e0/38e0*sin(28e0/27-2e0*t)-960e0/13e0*sin(33e0/83-t)+47e0/33e0*sin(3e0*t+296e0/87)+50e0/27e0*sin(4e0*t+2e0/11)+9e0/13e0*sin(5e0*t+222e0/89)+14327e0/24)*theta(39e0*pi-t)*theta(t-35e0*pi)+(-49e0/16e0*sin(25e0/39-4e0*t)-271e0/65e0*sin(23e0/25-2e0*t)-3790e0/33e0*sin(29e0/31-t)+15e0/4e0*sin(3e0*t+41e0/23)+18911e0/33)*theta(35e0*pi-t)*theta(t-31e0*pi)+(-119e0/29e0*sin(53e0/38-12e0*t)-73e0/30e0*sin(1e0/106-10e0*t)-1461e0/127e0*sin(10e0/61-6e0*t)-506e0/27e0*sin(35e0/31-3e0*t)-509e0/9e0*sin(24e0/37-2e0*t)-23306e0/71e0*sin(25e0/39-t)+293e0/50e0*sin(4e0*t+23e0/20)+597e0/40e0*sin(5e0*t+83e0/29)+152e0/17e0*sin(7e0*t+13e0/8)+118e0/29e0*sin(8e0*t+170e0/39)+133e0/34e0*sin(9e0*t+137e0/39)+95e0/16e0*sin(11e0*t+54e0/25)+8357e0/18)*theta(31e0*pi-t)*theta(t-27e0*pi)+(-262e0/31e0*sin(23e0/19-16e0*t)-612e0/89e0*sin(67e0/48-15e0*t)-1589e0/67e0*sin(5e0/13-6e0*t)-1033e0/19e0*sin(1e0/75-4e0*t)+2851e0/16e0*sin(t+15e0/23)+1471e0/10e0*sin(2e0*t+48e0/11)+2326e0/47e0*sin(3e0*t+26e0/37)+223e0/6e0*sin(5e0*t+138e0/53)+1529e0/32e0*sin(7e0*t+4e0/25)+182e0/23e0*sin(8e0*t+91e0/50)+218e0/51e0*sin(9e0*t+243e0/146)+898e0/63e0*sin(10e0*t+21e0/11)+306e0/23e0*sin(11e0*t+55e0/12)+260e0/23e0*sin(12e0*t+240e0/241)+109e0/22e0*sin(13e0*t+58e0/35)+350e0/43e0*sin(14e0*t+3e0/11)+119e0/64e0*sin(17e0*t+122e0/33)+56e0/13e0*sin(18e0*t+31e0/18)+74e0/27e0*sin(19e0*t+13e0/38)+87e0/25e0*sin(20e0*t+75e0/29)+41e0/15e0*sin(21e0*t+81e0/32)+12539e0/22)*theta(27e0*pi-t)*theta(t-23e0*pi)+(-101e0/21e0*sin(17e0/32-16e0*t)-35e0/34e0*sin(17e0/19-15e0*t)-64e0/5e0*sin(45e0/34-9e0*t)-71e0/17e0*sin(22e0/39-8e0*t)-4913e0/89e0*sin(23e0/25-3e0*t)+7057e0/32e0*sin(t+627e0/157)+1545e0/17e0*sin(2e0*t+53e0/16)+236e0/21e0*sin(4e0*t+65e0/16)+377e0/41e0*sin(5e0*t+45e0/14)+539e0/27e0*sin(6e0*t+10e0/11)+408e0/49e0*sin(7e0*t+37e0/20)+49e0/6e0*sin(10e0*t+19e0/35)+149e0/39e0*sin(11e0*t+77e0/17)+82e0/39e0*sin(12e0*t+122e0/33)+129e0/40e0*sin(13e0*t+193e0/50)+55e0/31e0*sin(14e0*t+63e0/34)+105e0/37e0*sin(17e0*t+118e0/29)+29e0/11e0*sin(18e0*t+59e0/18)+16e0/5e0*sin(19e0*t+37e0/12)+160e0/59e0*sin(20e0*t+19e0/27)-25342e0/45)*theta(23e0*pi-t)*theta(t-19e0*pi)+(-130e0/33e0*sin(5e0/41-6e0*t)-115e0/8e0*sin(1e0/8-2e0*t)-1674e0/11e0*sin(2e0/23-t)+75e0/19e0*sin(3e0*t+105e0/31)+144e0/31e0*sin(4e0*t+1e0/55)+198e0/43e0*sin(5e0*t+64e0/19)+57e0/22e0*sin(7e0*t+91e0/32)+24873e0/61)*theta(19e0*pi-t)*theta(t-15e0*pi)+(-8e0/27e0*sin(4e0/45-18e0*t)-44e0/45e0*sin(19e0/13-14e0*t)-184e0/31e0*sin(13e0/25-9e0*t)-118e0/35e0*sin(5e0/19-7e0*t)-3471e0/53e0*sin(8e0/29-t)+5861e0/59e0*sin(2e0*t+5e0/44)+963e0/25e0*sin(3e0*t+165e0/38)+1567e0/165e0*sin(4e0*t+149e0/34)+350e0/37e0*sin(5e0*t+33e0/13)+346e0/41e0*sin(6e0*t+61e0/27)+47e0/27e0*sin(8e0*t+27e0/16)+65e0/11e0*sin(10e0*t+59e0/23)+299e0/49e0*sin(11e0*t+87e0/25)+61e0/37e0*sin(12e0*t+173e0/37)+231e0/71e0*sin(13e0*t+67e0/23)+33e0/31e0*sin(15e0*t+385e0/96)+16e0/19e0*sin(16e0*t+14e0/3)+7e0/9e0*sin(17e0*t+109e0/26)+8297e0/26)*theta(15e0*pi-t)*theta(t-11e0*pi)+(-164e0/23e0*sin(34e0/31-4e0*t)+2702e0/19e0*sin(t+5e0/2)+312e0/31e0*sin(2e0*t+75e0/23)+527e0/39e0*sin(3e0*t+107e0/108)+31261e0/30)*theta(11e0*pi-t)*theta(t-7e0*pi)+(-47e0/41e0*sin(29e0/24-11e0*t)-160e0/59e0*sin(55e0/38-9e0*t)-55e0/18e0*sin(4e0/21-8e0*t)-88e0/29e0*sin(39e0/31-7e0*t)-108e0/19e0*sin(3e0/7-6e0*t)-144e0/25e0*sin(55e0/42-4e0*t)+2550e0/101e0*sin(t+127e0/33)+540e0/29e0*sin(2e0*t+14e0/3)+378e0/55e0*sin(3e0*t+80e0/19)+62e0/11e0*sin(5e0*t+209e0/46)+31e0/17e0*sin(10e0*t+5e0/18)+55e0/48e0*sin(12e0*t+23e0/41)+38813e0/52)*theta(7e0*pi-t)*theta(t-3e0*pi)+(-71e0/59e0*sin(31e0/30-12e0*t)-11e0/3e0*sin(4e0/5-7e0*t)+2195e0/8e0*sin(t+90e0/43)+5273e0/48e0*sin(2e0*t+107e0/31)+1879e0/39e0*sin(3e0*t+38e0/27)+33e0/5e0*sin(4e0*t+125e0/39)+196e0/11e0*sin(5e0*t+2e0/31)+281e0/28e0*sin(6e0*t+136e0/33)+350e0/57e0*sin(8e0*t+244e0/75)+56e0/13e0*sin(9e0*t+39e0/31)+16e0/11e0*sin(10e0*t+334e0/223)+58e0/31e0*sin(11e0*t+23e0/41)+7100e0/7)*theta(3e0*pi-t)*theta(t+pi))*theta(sqrt(sgn(sin(t/2))))
mx(t)=scl*x(t)
my(t)=scl*y(t)
fl(x,x0,y0,x1,y1)=real(x)*real(y1-y0)/real(x1-x0)+real(x1*y0-x0*y1)/real(x1-x0)
set isosamples 2000,2
i0=0
i1=10
z0=0e0
z1=2.5e0
#set term gif animate optimize delay 40 size 800,800
#set output 'mario.gif'
do for [i=i0:i1:1]{
splot \
"pipe.d" u 1:2:3 w l lc 2, "pipe2.d" u 1:2:3 w l lc 2,\
mx(u*96*pi),0,my(u*96*pi)+fl(i,i0,z0,i1,z1) w p pt 7 ps 0.2 lc 7
}
#set out
#set terminal wxt enhanced
[adsense2]
SCP-1968っぽい数式
SCP-1968 世界を包む逆因果の円環
に現れている数式です。
数式はTorus helix radius change equationより。
set parametric
set hidden3d back offset 0
set isosamples 400,20
set samples 400
set ticslevel 0
R=2e0
a=0.5e0
alpha=3e0
beta=-7e0
s=0.1e0
lda=2
set view equal xyz
set view 72,218,1.5,2
set xr[-2.5:2.5]
set yr[-2.5:2.5]
set zr[-2.5:2.5]
set ur[0:1]
set vr[0:1]
fx(u,t)=((R+a)/2e0+(R-a)/2e0*cos(alpha*u*pi+t))*cos(beta*(u*pi))
fy(u,t)=((R+a)/2e0+(R-a)/2e0*cos(alpha*u*pi+t))*sin(beta*(u*pi))
fz(u,t)=((R-a)/2e0)*sin(alpha*u*pi+t)
N=20
#set term gif animate optimize delay 4 size 500,430
#set output 'scp1968.gif'
do for[j=0:N-1]{
t=(2e0*pi/N/7e0)*j
splot fx(u*lda,t)+s*sin(v*2*pi),\
fy(u*lda,t)+s*sin(v*2*pi),\
1.5*fz(u*lda,t)+s*cos(v*2*pi)
}
#set out
#set terminal wxt enhanced
FGO召喚
(なんか良く分かりませんがメジェド様がバグるんですよね…)
▼ここクリックでこの場に展開
set yr[-5:5]
set zr[-2.8:2.8]
set view equal xyz
set view 90, 90, 2.5,1
set ticslevel 0
set parametric
set ur[0:1]
set vr[0:1]
set samples 40
set isosamples 10,27
unset xtics
unset ytics
unset ztics
unset key
set palette defined ( 0 '#d0e7ed',1 '#79f0f6')
unset colorbox
rx0=4e0
ry0=5e0
slt=0.3e0
slb=0.1e0
pi2=pi*2e0
q4a=1.0e0 # diamond parameter
q4b=0.6e0 # diamond parameter
q4s=0.4e0 # diamond parameter
dqx(q,u)=q*(cos(u)+0.1e0)**3
dqy(q,u)=q*(sin(u))**3
dqz(qs,q,u)=qs*dqx(q,u)
sizeq=0.8e0
theta=2e0*pi/4e0
rotqx(qx,qy,u,n,theta)=cos(n*theta+pi/4)*sizeq*dqx(qx,u)-sin(n*theta+pi/4)*sizeq*dqy(qy,u)
rotqy(qx,qy,u,n,theta)=sin(n*theta+pi/4)*sizeq*dqx(qx,u)+cos(n*theta+pi/4)*sizeq*dqy(qy,u)
xci=-1.e0
yci=0e0
rci=2.5e0
circlex(n,theta,ph,r)=xci+r*cos(n*theta+ph)
circley(n,theta,ph,r)=yci+r*sin(n*theta+ph)
sloped=-0.25e0
constd=-2e0
Nball=12
dox(q,u)=q*(cos(u))**3
doy(q,u)=q*(sin(u))**3
#---
ball0=rci*0.25e0 # initial radious of balls
ball1=rci # rotating radious of balls
#---
rad=0.1e0
outR=ball1+rad/2
inR=ball1-rad/2
# +--- hypotrochoid ----+
# if h=1 --> hypocycloid
hcyc(n,h,t)=(real(n-1)*cos(t)+h*cos(t*real(n-1)))/real(n)
hcys(n,h,t)=(real(n-1)*sin(t)-h*sin(t*real(n-1)))/real(n)
hc3x(n,h,u,v)=hcys(n,h,u)*hcyc(n,h,v)
hc3y(n,h,u,v)=hcys(n,h,u)*hcys(n,h,v)
hc3z(n,h,u)=hcyc(n,h,u)
hhyp=1e0
nhyp=10
vcr=0.2e0
fth(a,x,x0,f0,x1,f1)=( x < x0 ? f0 : (x > x1 ? f1 : (f0-f1)*tanh(a*(real(x)-(x0+x1)*0.5e0))/(tanh(a*(real(x0)-(x0+x1)*0.5e0))-tanh(a*(real(x1)-(x0+x1)*0.5e0)))+(-f0*tanh(a*(real(x1)-(x0+x1)*0.5e0))+f1*tanh(a*(real(x0)-(x0+x1)*0.5e0)))/(tanh(a*(real(x0)-(x0+x1)*0.5e0))-tanh(a*(real(x1)-(x0+x1)*0.5e0)))))
k0=8 # appaer balls
k1=20 # expand balls and circles to outer circle
k2=20 # rotate balls
k3=20 # rotate balls and superimpose line
k4=20 # expand lines to 3 lines
k5=20 # compose lines to center
k6=20 # expansion center hyptrocoid
k7=40 # make and rotate medjed, make and disappear cascade
k8=30 # medjed come to near
j0=k0
j1=k0+k1
j2=k0+k1+k2
j3=k0+k1+k2+k3
j4=k0+k1+k2+k3+k4
j5=k0+k1+k2+k3+k4+k5
j6=k0+k1+k2+k3+k4+k5+k6
j7=k0+k1+k2+k3+k4+k5+k6+k7
j8=k0+k1+k2+k3+k4+k5+k6+k7+k8
#set term gif animate optimize delay 6 size 500,430
#set output 'fgo.gif'
ht=0.1e0
mint=0e0
maxt=ht*j0
do for[j=0:j0]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(ball0-0.8e0,u*pi2)+xci,doy(ball0-0.8e0,u*pi2)+yci,sloped*(dox(ball0-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(ball0-0.8e0,u*pi2)-doy(ball0-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(ball0-0.8e0,u*pi2)+doy(ball0-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(ball0-0.8e0,u*pi2)-doy(ball0-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,ball0),circley(1,u*pi2,0e0,ball0),sloped*circlex(1,u*pi2,0e0,ball0)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,ball0),circley(1,u*pi2,0e0,ball0),sloped*circlex(1,u*pi2,0e0,ball0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+xci,\
0.1e0*cos(u*pi2)+yci, \
(0.1e0*sin(u*pi2)+xci)*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+xci,\
0.1e0*cos(u*pi2)+yci, \
(0.1e0*sin(u*pi2)+xci)*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,pi2*real(i)/Nball,ball0),\
0.1e0*sin(u*pi)*cos(v*pi2)+circley(1,0e0,pi2*real(i)/Nball,ball0), \
0.1e0*cos(u*pi)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,pi2*real(i)/Nball,ball0))*sloped+constd+fth(1e0,t,mint,0e0,maxt,0.3e0) lw 1 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)**1+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)**1+yci,hc3z(nhyp,hhyp,u*pi)**1 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*(j0+1)
maxt=ht*(j1)
inca=10e0
balla=25e0
do for[j=j0+1:j1]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)+xci,doy(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)+yci,sloped*(dox(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)-doy(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)+doy(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2)-doy(fth(inca,t,mint,ball0,maxt,rci)-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,fth(inca,t,mint,ball0,maxt,rci)),circley(1,u*pi2,0e0,fth(inca,t,mint,ball0,maxt,rci)),sloped*circlex(1,u*pi2,0e0,fth(inca,t,mint,ball0,maxt,rci))+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] fth(40e0,t,mint,0e0,maxt,1e0)*rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,fth(inca,t,mint,ball0,maxt,rci)),\
fth(40e0,t,mint,0e0,maxt,1e0)*rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,fth(inca,t,mint,ball0,maxt,rci)),\
(fth(40e0,t,mint,0e0,maxt,1e0)*rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,fth(inca,t,mint,ball0,maxt,rci)))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*xci+fth(balla,t,mint,0e0,maxt,1e0)*circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*yci+fth(balla,t,mint,0e0,maxt,1e0)*circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*xci+fth(balla,t,mint,0e0,maxt,1e0)*circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*xci+fth(balla,t,mint,0e0,maxt,1e0)*circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*yci+fth(balla,t,mint,0e0,maxt,1e0)*circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+fth(balla,t,mint,1e0,maxt,0e0)*xci+fth(balla,t,mint,0e0,maxt,1e0)*circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,pi2*real(i)/Nball,fth(balla,t,mint,ball0,maxt,ball1)),\
0.1e0*sin(u*pi)*cos(v*pi2)+circley(1,0e0,pi2*real(i)/Nball,fth(balla,t,mint,ball0,maxt,ball1)),\
0.1e0*cos(u*pi)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,pi2*real(i)/Nball,fth(balla,t,mint,ball0,maxt,ball1)))*sloped+constd+0.3e0 lw 1 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)**1+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)**1+yci,hc3z(nhyp,hhyp,u*pi)**1 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*(j1+1)
maxt=ht*(j2)
inca=10e0
balla=25e0
do for[j=j1+1:j2]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1),\
0.1e0*sin(u*pi)*cos(v*pi2)+circley(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1),\
0.1e0*cos(u*pi)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1))*sloped+constd+0.3e0 lw 1 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)**1+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)**1+yci,hc3z(nhyp,hhyp,u*pi)**1 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*(j2+1)
maxt=ht*(j3)
inca=10e0
balla=25e0
do for[j=j2+1:j3]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)*fth(2,t,mint,1e0,maxt,0e0)+circlex(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1),\
0.1e0*sin(u*pi)*cos(v*pi2)*fth(2,t,mint,1e0,maxt,0e0)+circley(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1),\
0.1e0*cos(u*pi)*fth(2,t,mint,1e0,maxt,0e0)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(t-ht*(j1+1))**2+pi2*real(i)/Nball,ball1))*sloped+constd+0.3e0 lw 1 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0)+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0)+yci,hc3z(nhyp,hhyp,u*pi)+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0) lt 1 lc rgb "#79f0f6",\
(cos(v*pi2)*(ball1+fth(2,t,mint,0e0,maxt,1e0)*rad*cos(u*pi2)))+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0)+xci,\
(sin(v*pi2)*(ball1+fth(2,t,mint,0e0,maxt,1e0)*rad*cos(u*pi2)))+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0)+yci,\
(sin(u*pi2)*fth(2,t,mint,0e0,maxt,1e0)*rad)+rand(0)*0.15e0*fth(2,t,mint,0e0,maxt,1e0)+(cos(v*pi2)*(ball1+fth(2,t,mint,0e0,maxt,1e0)*rad*cos(u*pi2))+xci)*sloped+constd+0.3e0 lw 2 lt 1 lc rgb "#d0e7ed"
#------------
}
ht=0.1e0
mint=ht*(j3+1)
maxt=ht*(j4)
inca=10e0
balla=25e0
ball2=9e0
do for[j=j3+1:j4]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
(cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0))+rand(0)*0.15e0+xci,\
(sin(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(sin(v*pi2)*(ball2+rad*cos(u*pi2))))+rand(0)*0.15e0+yci,\
fth(20e0,t,mint,1e0,maxt,0e0)*(sin(u*pi2)*rad)+rand(0)*fth(20e0,t,mint,0.15e0,maxt,0.4e0)+((cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)))*sloped+constd+fth(20e0,t,mint,0.5e0,maxt,1.5e0) lw 2 lt 1 lc rgb "#d0e7ed",\
(cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0))+rand(0)*0.15e0+xci,\
(sin(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(sin(v*pi2)*(ball2+rad*cos(u*pi2))))+rand(0)*0.15e0+yci,\
fth(20e0,t,mint,1e0,maxt,0e0)*(sin(u*pi2)*rad)+rand(0)*fth(20e0,t,mint,0.15e0,maxt,0.2e0)+((cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)))*sloped+constd+fth(20e0,t,mint,0.5e0,maxt,0.5e0) lw 2 lt 1 lc rgb "#d0e7ed",\
(cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0))+rand(0)*0.15e0+xci,\
(sin(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(sin(v*pi2)*(ball2+rad*cos(u*pi2))))+rand(0)*0.15e0+yci,\
fth(20e0,t,mint,1e0,maxt,0e0)*(sin(u*pi2)*rad)+rand(0)*fth(20e0,t,mint,0.15e0,maxt,0.2e0)+((cos(v*pi2)*(ball1+rad*cos(u*pi2))*fth(20e0,t,mint,1e0,maxt,0e0)+fth(20e0,t,mint,0e0,maxt,1e0)*(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)))*(fth(20e0,t,mint,sloped,maxt,-sloped))+constd+fth(20e0,t,mint,0.5e0,maxt,3.8e0) lw 2 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)+rand(0)*fth(20e0,t,mint,0.15e0,maxt,0.3e0)+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.15e0+yci,hc3z(nhyp,hhyp,u*pi)+rand(0)*0.15e0 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*(j4+1)
maxt=ht*(j5)
inca=10e0
balla=25e0
ringa=10e0
ball2=9e0
do for[j=j4+1:j5]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
(((0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)+rand(0)*0.15e0+xci))*fth(ringa,t,mint,1e0,maxt,0e0),\
(((sin(v*pi2)*(ball2+rad*cos(u*pi2))))+rand(0)*0.15e0+yci)*fth(ringa,t,mint,1e0,maxt,0e0),\
(rand(0)*0.4e0+(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)*sloped+constd+1.5e0)*fth(ringa,t,mint,1e0,maxt,0e0) lw 2 lt 1 lc rgb "#d0e7ed",\
((0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)+rand(0)*0.15e0+xci)*fth(ringa,t,mint,1e0,maxt,0e0),\
(((sin(v*pi2)*(ball2+rad*cos(u*pi2))))+rand(0)*0.15e0+yci)*fth(ringa,t,mint,1e0,maxt,0e0),\
(rand(0)*0.2e0+(((0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)))*sloped+constd+0.5e0)*fth(ringa,t,mint,1e0,maxt,0e0) lw 2 lt 1 lc rgb "#d0e7ed",\
((0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)+rand(0)*0.15e0+xci)*fth(ringa,t,mint,1e0,maxt,0e0),\
((sin(v*pi2)*(ball2+rad*cos(u*pi2)))+rand(0)*0.15e0+yci)*fth(ringa,t,mint,1e0,maxt,0e0),\
(rand(0)*0.2e0+(0.5e0*(cos(v*pi2)*(ball2+rad*cos(u*pi2)))+2e0)*(-sloped)+constd+3.8e0)*fth(ringa,t,mint,1e0,maxt,0e0) lw 2 lt 1 lc rgb "#d0e7ed",\
hc3x(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.3e0+xci,hc3y(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.15e0+yci,hc3z(nhyp,hhyp,u*pi)+rand(0)*0.15e0 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*(j5+1)
maxt=ht*(j6)
inca=10e0
balla=25e0
ball2=9e0
do for[j=j5+1:j6]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
fth(20e0,t,mint,0.9e0,maxt,10e0)*hc3x(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.3e0+xci,fth(20e0,t,mint,0.9e0,maxt,10e0)*hc3y(nhyp,hhyp,u*pi,v*pi2)+rand(0)*0.15e0+yci,fth(20e0,t,mint,0.9e0,maxt,10e0)*hc3z(nhyp,hhyp,u*pi)+rand(0)*0.15e0 lt 1 lc rgb "#79f0f6"
#------------
}
ht=0.1e0
mint=ht*real(j6+1)
maxt=ht*real(j7)
inca=10e0
balla=25e0
ball2=9e0
vrt=4e0
do for[j=j6+1:j7]{
t=ht*j
ttx=fth(2e0,t,mint,1e0,maxt,0e0)*vrt*(t-ht*j7)
qt=cos(ttx)
rt=sin(ttx)
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0), \
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(fth(5e0,t,mint,1e0,maxt,1e0)*t-ht*(j1+1))+pi2*real(i)/Nball,ball1),\
0.1e0*sin(u*pi)*cos(v*pi2)+circley(1,0e0,(fth(5e0,t,mint,1e0,maxt,1e0)*t-ht*(j1+1))+pi2*real(i)/Nball,ball1),\
0.1e0*cos(u*pi)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(fth(5e0,t,mint,1e0,maxt,1e0)*t-ht*(j1+1))+pi2*real(i)/Nball,ball1))*sloped+constd+0.3e0 lw 1 lt 1 lc rgb "#d0e7ed",\
"medjed3.png" binary filetype=png array=150x218 flip=y dx=0.01e0 dy=0.01e0 rot=90d center=(xci,yci,0) perp = (qt,rt,0) format="%uchar" u 1:2:3 with rgbimage,\
fth(2e0,t,mint,1e0,(maxt+mint)/2,0e0)*0.6e0*cos(v*pi2)/u+xci,fth(2e0,t,mint,1e0,(maxt+mint)/2e0,0e0)*0.6e0*sin(v*pi2)/u+yci,(abs(fth(2e0,t,mint,1e0,(maxt+mint)/2e0,0e0)) >1e-2 ? u*8e0-8e0/2e0+rand(0)*0.5e0 : 1/0) lw 2 lt 1 lc rgb "#79f0f6"
#------------
}
#
ht=0.1e0
mint=ht*(j7+1)
maxt=ht*(j8)
inca=10e0
balla=25e0
ball2=9e0
vrt=4e0
do for[j=j7+1:j8]{
t=ht*j
#------------
splot \
'background.png' binary filetype=png array=800x452 flip=y dx=0.02 dy=0.02 rot=90d center=(-4.9,yci,0) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage,\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),3.1e0+slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),1e0+slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-2.8e0-slt*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
rx0*cos(u*pi+pi/2),ry0*sin(u*pi+pi/2),-0.7e0-slb*rx0*cos(u*pi+pi/2) lw 1 lt 1 lc rgb "#d0e7ed",\
for[i=10:13] sprintf("fort.%d",i) u (rx0*($1*cos(t*vcr)-$2*sin(t*vcr))):(ry0*($1*sin(t*vcr)+$2*cos(t*vcr))):( $1*cos(t*vcr)-$2*sin(t*vcr) < 0 ? ($3+1.4e0+(slt+slb)*0.5e0*(rx0*($1*cos(t*vcr)-$2*sin(t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette ,\
for[i=50:53] sprintf("fort.%d",i) u (rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr))):(ry0*($1*sin(-t*vcr)+$2*cos(-t*vcr))):( $1*cos(-t*vcr)-$2*sin(-t*vcr) < 0 ? ($3-2.4e0-(slt+slb)*0.5e0*(rx0*($1*cos(-t*vcr)-$2*sin(-t*vcr)))) : 1/0 ):4 w l lw 2 lt 1 lc palette,\
dox(rci-0.8e0,u*pi2)+xci,doy(rci-0.8e0,u*pi2)+yci,sloped*(dox(rci-0.8e0,u*pi2)+xci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
(dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci,(dox(rci-0.8e0,u*pi2)+doy(rci-0.8e0,u*pi2))/sqrt(2e0)+yci,sloped*((dox(rci-0.8e0,u*pi2)-doy(rci-0.8e0,u*pi2))/sqrt(2e0)+xci)+constd lt 1 lw 2 lc rgb "#d0e7ed" ,\
circlex(1,u*pi2,0e0,rci),circley(1,u*pi2,0e0,rci),sloped*circlex(1,u*pi2,0e0,rci)+constd lt 1 lw 2 lc rgb "#79f0f6",\
circlex(1,u*pi2,0e0,rci*0.25e0),circley(1,u*pi2,0e0,rci*0.25e0),sloped*circlex(1,u*pi2,0e0,rci*0.25e0)+constd lw 2 lt 1 lc rgb "#79f0f6",\
for[i=0:3] rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci),\
rotqy(q4a,q4b,u*pi2,i,theta)+circley(i,theta,pi/4,rci),\
(rotqx(q4a,q4b,u*pi2,i,theta)+circlex(i,theta,pi/4,rci))*sloped+constd lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi2*real(i)/4,1.7e0),\
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#79f0f6",\
for[i=0:3] 0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
0.1e0*cos(u*pi2)+circley(1,0e0,pi/4+pi2*real(i)/4,1.7e0),\
(0.1e0*sin(u*pi2)+circlex(1,0e0,pi/4+pi2*real(i)/4,1.7e0))*sloped+constd lw 8 lt 1 lc rgb "#d0e7ed",\
for[i=0:11] 0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(1e0*t-ht*(j1+1))+pi2*real(i)/Nball,ball1),\
0.1e0*sin(u*pi)*cos(v*pi2)+circley(1,0e0,(1e0*t-ht*(j1+1))+pi2*real(i)/Nball,ball1),\
0.1e0*cos(u*pi)+(0.1e0*sin(u*pi)*sin(v*pi2)+circlex(1,0e0,(1e0*t-ht*(j1+1))+pi2*real(i)/Nball,ball1))*sloped+constd+0.3e0 lw 1 lt 1 lc rgb "#d0e7ed",\
'medjed3.png' binary filetype=png array=150x218 flip=y dx=fth(10e0,t,mint,0.01e0,maxt,0.18e0) dy=fth(10e0,t,mint,0.01e0,maxt,0.18e0) rot=90d center=(xci+fth(10e0,t,mint,0e0,maxt,4e0),yci,fth(10e0,t,mint,0e0,maxt,-11e0)) perp = (1,0,0) format='%uchar' u 1:2:3 with rgbimage
#------------
}
#set out
#set terminal wxt enhanced
パンジャンドラム
set parametric
set ticslevel 0
set ur[0:1]
set vr[0:1]
set tr[0:1]
set samples 40
set isosamples 40,8
unset key
set xr[-3:3]
set yr[-3:3]
set zr[-3:3]
x0=1e0 # center position of the main wheel from the origin
w0=0.3e0 # width of the main wheel from the origin
r0=2e0 # radious of the main wheel
r1=0.75e0 # radious of the pole between wheels
w1=2e0*x0
# cilinder parametric
dx(u)=(u-0.5e0)
dy(v)=sin(v*2e0*pi)
dz(v)=cos(v*2e0*pi)
cbr=(r0+r1)*0.5e0 # center of the branches radious
bbr=(r0-r1) # length of the branches radious
branchy(u,th) = -((u-0.5e0)*bbr+cbr)*sin(th*pi/180e0)
branchz(u,th) = ((u-0.5e0)*bbr+cbr)*cos(th*pi/180e0)
Nb=10 # Number of branches
# Rocket
Rktr=0.08e0 # Rocket radious
Rktl=0.6e0 # Rocket length
Rkth=r0*0.9e0 # Rocket height
Rx(u) = Rktr*dy(u)+x0+0.5e0*w0+Rktr
Ry(v) = Rktl*dx(v)-Rktl*0.5e0
Rz(u) = Rktr*dz(u)+Rkth
Rktx(u) = Rx(u)
Rkty(u,v,th) = Ry(v)*cos(th*pi/180e0)-Rz(u)*sin(th*pi/180e0)
Rktz(u,v,th) = Ry(v)*sin(th*pi/180e0)+Rz(u)*cos(th*pi/180e0)
hth=360e0/(Nb-1)
mdx(u) = dx(u)
mdy(v,th) = dy(v)*cos(th*pi/180e0)-dz(v)*sin(th*pi/180e0)
mdz(v,th) = dy(v)*sin(th*pi/180e0)+dz(v)*cos(th*pi/180e0)
pcol=6
pw=2e0 #rotation acceralation
imax=100
vel= -0.1e0 #-hth/(imax-1)
#set term gif animate optimize delay 4 size 480,480
#set output 'panjandrum.gif'
do for[i=1:imax]{
splot w0*mdx(v)+x0,r0*mdy(u,(i-1)**pw*vel),r0*mdz(u,(i-1)**pw*vel) lc pcol,\
w0*mdx(v)-x0,r0*mdy(u,(i-1)**pw*vel),r0*mdz(u,(i-1)**pw*vel) lc pcol,\
w1*mdx(u) ,r1*mdy(v,(i-1)**pw*vel),r1*mdz(v,(i-1)**pw*vel) lc pcol,\
for[k=1:Nb] -x0,branchy(u,(k-1)*hth+(i-1)**pw*vel),branchz(u,(k-1)*hth+(i-1)**pw*vel) lc pcol notitle,\
for[k=1:Nb] +x0,branchy(u,(k-1)*hth+(i-1)**pw*vel),branchz(u,(k-1)*hth+(i-1)**pw*vel) lc pcol notitle,\
for[k=1:Nb] Rktx(u),Rkty(u,v,(k-1)*hth+(i-1)**pw*vel),Rktz(u,v,(k-1)*hth+(i-1)**pw*vel) lw 0.3 lc pcol notitle,\
for[k=1:Nb] -Rktx(u),Rkty(u,v,(k-1)*hth+(i-1)**pw*vel),Rktz(u,v,(k-1)*hth+(i-1)**pw*vel) lw 0.3 lc pcol notitle
}
#set out
#set terminal wxt enhanced
gifアニメについて
gifアニメの描画時間を早くしたり遅くしたりするには、
などと「delay 10」という文を付け加えましょう。delayは遅延、後ろの数字は遅延時間で、単位は0.01sになっています。
例として、
delay 5の場合は1秒間に20枚、
delay 10の場合は1秒間に10枚、
delay 50の場合は1秒間に2枚
表示させるスピードだということです。
delayはどんなに早くしたくても4程度までがいいです。delayを1とかにするとそんなに早いgifアニメの描写が出来ず、ブラウザ上でうまく表示できず、結果として遅く表示されます。
ffmpegを用いてavi動画を作る
ffmpegのインストール方法はCompile FFmpeg on Ubuntu, Debian, or Mintを参考にしてください。
このページにもインストール方法を書きましたが、更新が早いので公式のページを見るほうが確実です。
ここではgnuplotの視点を変更した画像をたくさん用意して動画を作成する、という方法をとります。
ディレクトリ”dat/”と視点変更と連続した画像を出力するスクリプトは”image.plt”というファイルを用意して
set view 60,2*j,0.5,3
replot
call "out.plt" "temp"
if(0<=j && j<10){
cv=sprintf("mv temp.jpg ./dat/image0000%d.jpg",j)
}
if(10<=j && j<100){
cv=sprintf("mv temp.jpg ./dat/image000%d.jpg",j)
}
if(100<=j && j<1000){
cv=sprintf("mv temp.jpg ./dat/image00%d.jpg",j)
}
if(1000<=j && j<10000){
cv=sprintf("mv temp.jpg ./dat/image0%d.jpg",j)
}
if(10000<=j && j<100000){
cv=sprintf("mv temp.jpg ./dat/image%d.jpg",j)
}
system cv
}
#Using Imagemagick, convert
#cv=sprintf("convert -delay 20 -resize 100% -loop 0 ./dat/image*.jpg ./anime.gif")
#Using ffmpeg
cv=sprintf("ffmpeg -r 12 -i './dat/image%05d.jpg' -vcodec mjpeg -qscale 0 -s 1300x888 movieout.avi")
system cv
とすればディレクトリ./dat/の中に180枚の.jpg画像が作られ、その場所にファイル名”movieout.avi”という動画が作られます。
凄い技術ですね。興奮しました。
楽しんでいただけて何よりです。
ありがとうございます。
GNU plotってレポート用グラフ作成ツール程度にしか思ってなかったです・・
スゴイ技ですねシェル芸はLinux界隈ではよく聞きますがGNU plot芸のほうがインパクトがすごいです
点をグラフに沿って動かす際の、「set label 1 point pt 7 ps 3 at e*cos(omega*i*3)/sqrt(i*3),sin(omega*i*3)/sqrt(i*3)」において、なぜtがi*3になるのですか??
特に”3”に理由はありません。
動画にした時にいい感じの描画速度だったからです。
もちろんt=iにしても構いませんが、それだと点の動くスピードが遅く、嫌だったのです。
学生時代にfortranで流体解析をした結果を表示する際にシキノートさんにお世話になりました。
ITエンジニアとなったのですが、一つの技術をここまで極めて知識としてまとめていること尊敬します。
ありがとうございました。
コメントありがとうございます。
どなたかが、特に学生が時間がない中で、私と同じあまり面白くない部分でつまづくことが無いようになればいいな、と
いう思いもあり、実際にそのようなコメントを聞けて非常に嬉しい限りです。
拙い部分が多くあったと思いますが、ご参照いただきありがとうございました。