
The Archimedean spiral is a spiral named after the Greek mathematician Archimedes.



An Archimedean spiral can be described by the equation:






r
=
a
+
b
θ


{\displaystyle \,r=a+b\theta }


with real numbers a and b.



Task
Draw an Archimedean spiral.




using UnicodePlots
 
spiral(θ, a=0, b=1) = @. b * θ * cos(θ + a), b * θ * sin(θ + a)
 
x, y = spiral(1:0.1:10)
println(lineplot(x, y))