Lesson goal: Sin, cos and circles

Previous: Introduction | Home | Next: Plot a star

You can use a for-loop and sin and cos to investigate how circles are formed. Remember that in the unit circle, the $x$ coordinate is always represented by $\cos$ and the $y$ by the $\sin$. So suppose you used a for-loop to count from $0$ to $360^\circ$. Using this angle to compute both the sin and cos, could you use pset to plot a circle?

This is a good time to experiment with the step parameter with for loops. Review this parameter here in case you forgot.

Now you try. Try fixing the for angle= statement.

Type your code here:

See your results here: