# 貝

```uu <- seq(from=0,to=2*pi,length=50)
vv <- seq(from=-2*pi,to=2*pi,length=100)
uv <- expand.grid(uu,vv)

x <- 5/4*(1-uv[,2]/(2*pi))*cos(2*uv[,2])*(1+cos(uv[,1]))+cos(2*uv[,2])
y <- 5/4*(1-uv[,2]/(2*pi))*sin(2*uv[,2])*(1+cos(uv[,1]))+sin(2*uv[,2])
z <- 10*uv[,2]/(2*pi) + 5/4*(1-uv[,2]/(2*pi))*sin(uv[,1]) + 15

library(rgl)
xyz <- cbind(x,y,z)
xyz. <- rbind(xyz,rep(min(xyz),3))
xyz. <- rbind(xyz.,rep(max(xyz),3))
plot3d(xyz.)

uu <- seq(from=0,to=6*pi,length=100)
vv <- seq(from=0,to=2*pi,length=100)
#vv <- c(0,pi)
uv <- expand.grid(uu,vv)

x <- 2*(1-exp(uv[,1]/(6*pi)))*cos(uv[,1])*(cos(1/2*uv[,2]))^2
y <- 2*(-1+exp(uv[,1]/(6*pi)))*sin(uv[,1])*(cos(1/2*uv[,2]))^2
z <- 1-exp(uv[,1]/(3*pi))-sin(uv[,2]) + exp(uv[,1]/(6*pi)) * sin(uv[,2])
xyz <- cbind(x,y,z)
xyz. <- rbind(xyz,rep(min(xyz),3))
xyz. <- rbind(xyz.,rep(max(xyz),3))
plot3d(xyz.)
```
```a <- 140
k <- tan((a-90)/180*pi)

#k <- 2
t <- seq(from=-1,to=1,length=1000)*5*pi

x <- exp(k*t)*cos(t)
y <- exp(k*t)*sin(t)

plot(x,y,asp=TRUE)
```