
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.




real A, B, R, T, X, Y;
[SetVid($12);           \set 640x480 graphics
A:= 0.0;  B:= 3.0;  T:= 0.0;
Move(320, 240);         \start at center of screen
repeat  R:= A + B*T;
        X:= R*Cos(T);  Y:= R*Sin(T);
        Line(fix(X)+320, 240-fix(Y), 4\red\);
        T:= T + 0.03;   \increase angle (Theta)
until   T >= 314.159;   \50 revs
]