drosofff
12/26/2016 - 4:22 PM

## Various spirales

Various spirales

``````theta=seq(0,10*pi, by=0.001)

# simple spirale; power of theta determines the acceleration
x=theta^4 * cos(theta)
y=theta^4 * sin(theta)
plot(x,y, type="l", col="darkblue", lwd=5)

# a "lasso" spirale
x= log(theta) * cos(theta)
y= log(theta) * sin(theta)
plot(x,y, type="l", col="darkblue", lwd=5)

# with amazing phenomena is changing the range of theta and multiplying by cos or sin(x) or sin(y)
# example:

theta=seq(-pi/2,pi/2, length.out=1000)
x= log(theta) * cos(theta) * cos(x)
y= log(theta) * sin(theta) * sin(y)
plot(x,y, type="l", col="darkblue", lwd=5)

# "Cesar" compression # work on limites to recover the stack
theta=seq(0,10*pi, length.out=1000)
x= log(theta) * cos(theta) * sin(log(theta) * cos(theta))
y= log(theta) * sin(theta) * sin(log(theta) * sin(theta))
plot(x,y, type="l", col="darkblue", lwd=5)

# Another very nice one; work on colours needed
theta=seq(0,10*pi, length.out=1000)
x=theta^1/2 * cos(theta) * sin(theta^1/2 * cos(theta))
y=theta^1/2 * sin(theta) * sin(theta^1/2 * sin(theta))
plot(x,y, type="l", col="darkblue", lwd=1)

# gribouilli d'artiste
theta=seq(0,10*pi, length.out=20000)
x=theta^2 * cos(theta) *sin(theta^2 * cos(theta))
y=theta^2 * sin(theta) *sin(theta^2 * sin(theta))
plot(x,y, type="l", col="darkblue", lwd=1)
``````