# 駆け足で読む『複素関数のさわり』

x<-seq(from=-5,to=5,by=0.05)
y<-seq(from=-5,to=5,by=0.05)
xy<-expand.grid(x,y)
z<-complex(real=xy[,1],imaginary=xy[,2])

# 以下、虚部を第3軸に与えている
# 実部で描くためには、Re(exp(z))などとする

plot3d(xy[,1],xy[,2],Im(exp(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="exp",dir=".")

plot3d(xy[,1],xy[,2],Im(cos(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="cos",dir=".")

plot3d(xy[,1],xy[,2],Im(sin(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="sin",dir=".")

plot3d(xy[,1],xy[,2],Im(cosh(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="cosh",dir=".")

plot3d(xy[,1],xy[,2],Im(sinh(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="sinh",dir=".")

plot3d(xy[,1],xy[,2],Im(acos(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="acos",dir=".")

plot3d(xy[,1],xy[,2],Im(asin(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="asin",dir=".")

plot3d(xy[,1],xy[,2],Im(acosh(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="acosh",dir=".")

plot3d(xy[,1],xy[,2],Im(asinh(z)),col=rainbow(1000))

X <- par3d("userMatrix")
movie3d( par3dinterp( userMatrix=list(X,rotate3d(X, pi/2, 1, 0, 0),rotate3d(X, pi/2, 0, 1, 0) )), duration=5 ,movie="asinh",dir=".")

# 関数間の比較用
open3d()
plot3d(xy[,1],xy[,2],Re(exp(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Im(exp(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Re(cos(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Im(cos(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Re(sin(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Im(sin(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Re(cosh(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Im(cosh(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Re(sinh(z)),col=rainbow(1000))
open3d()
plot3d(xy[,1],xy[,2],Im(sinh(z)),col=rainbow(1000))


• 第５章　留数定理
• 留数は特異点のタイプとその数と一周ぐるりとの関係で決まる
• 留数を求めると積分もできてしまう