Computer Science, asked by akhtarkhank476, 9 months ago

How do you draw a circle using the midpoint algorithm?

Answers

Answered by nasiransari986737682
2

Explanation:

Step1: Put x =0, y =r in equation 2. We have p=1-r.

Step1: Put x =0, y =r in equation 2. We have p=1-r.Step2: Repeat steps while x ≤ y. Plot (x, y) If (p<0) Then set p = p + 2x + 3. Else. p = p + 2(x-y)+5. y =y - 1 (end if) x =x+1 (end loop)

Step1: Put x =0, y =r in equation 2. We have p=1-r.Step2: Repeat steps while x ≤ y. Plot (x, y) If (p<0) Then set p = p + 2x + 3. Else. p = p + 2(x-y)+5. y =y - 1 (end if) x =x+1 (end loop)Step3: End.

please please please mark me as brain list

Answered by bindupoonia245
9

Answer:

Step1: Put x =0, y =r in equation 2

We have p=1-r

Step2: Repeat steps while x ≤ y

Plot (x, y)

If (p<0)

Then set p = p + 2x + 3

Else

p = p + 2(x-y)+5

y =y - 1 (end if)

x =x+1 (end loop)

Step3: End

Similar questions