Question: write a code to draw a circle based on slide 1 3 : chapter 2 write a code to draw a circle based on slide
write a code to draw a circle based on slide : chapter write a code to draw a circle based on slide : chapter
Input: cxcy is the center, is the radius, and is number of sides
Output: a regular polygon of sides
Steps
Step
Set angle
Compute
Compute step
Input: cxcy is the center, R is the radius, and S is number of sides
Output: a regular polygon of S sides
Steps
Step pi S
Set angle theta
Compute p cx r Cos theta cy r Sin theta
Compute p cx r Cos theta step cy r Sin theta step
Plot the line between p and p
theta theta step
Go to step if theta has not exceeded pi
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
