Experiment: DDA LINE ALGORITHM
Student Name:๎GANESH KUMAR๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ UID:20BCA1534
Branch:๎UIC-BCA๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ Section/Group: BCA-3-/A
Semester:๎ 5th๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ Date of Performance:31--Aug
Subject Name: Computer graphics๎๎Lab๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎Subject Code: 20CAP-316
AIM: Draw Circle using Mid Point Algorithm:
A. Task to be done: Scan convert a circle with center (30,40) and radius 8 using mid-
point circle algorithm
Steps of Experiment:
Step1. Put x=0 ,y=r in equation 2
Were 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.