sin and
need sine and cosine
per se; what it actually does is
rotate a point around the origin in two nested loops, and also rotate two
angles just for the animation. If you’ll recall from the other article, the
inner loop is just plotting dots in a circle, which goes around another, larger
circle. In each loop, the sine/cosine terms are just moving by a small, fixed
angle.
So we don’t need to track the
angle at all, we only need to start at cos=1,
sin=0 and rotate a circle around the origin to generate all the sines and