[Tutor] Using trigonometry to draw a circle

Phil phillor9 at gmail.com
Tue May 18 04:26:10 EDT 2021


On 18/5/21 6:12 pm, Joel Goldstick wrote:
> More to the point (no pun intended), those math functions are defined
> for radians, not degrees.  There are 2*pi radians in a circle, and 360
> degrees.  So, you need to convert degrees to radians.
Thanks Joel,

x = math.cos(angle / 180) * radius + x_centre
...

Solves that problem. Now I think I can see how I can construct a function that draws part of a circle given the start and end angle along the circumference.

-- 

Regards,
Phil



More information about the Tutor mailing list