The BASIC code in Sinewheel says that the
parametrization of a circle with center at $(x_0,y_0)$ and radius $r$ is
$(x,y) = (x_0 + r\cos(\theta), y_0 + r\sin(\theta))$
where $ 0 \le \theta \le 2\pi$.
The variable "X" represents $\theta$ in degrees,
to make it easier
taking steps
of 6 degrees. The program draws the radius,
followed by a line from $(x,y)$ to $(x+r\theta, y)$
to $(x+r\theta, y_0)$.
The corners appear to trace
out the sine-fuction, $\eta =\sin(\xi)$ on a positive
$\xi$-axis starting at $(x_0 + r, y_0)$,
appropriately scaled.
Note that to avoid confusing the two coordinate
systems, we chose Roman for the screen coordinates
and
Greek for the graph of the sine-function.