Page 66 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 66
Lab on Computer Graphics
Notes {p+=2*x+1;
else
{
Y– –;
p+=2*(x–y)+1;
}
cliplot(x 1 , y 1 , x, y);
}
}
void cliplot(int xctr, int yctr, int x, int y)
{
putpixel(xctr +x, yctr +y, 1);
putpixel(xctr –x, yctr +y, 1);
putpixel(xctr +x, yctr –y, 1);
putpixel(xctr –x, yctr –y, 1);
putpixel(xctr +y, yctr +x, 1);
putpixel(xctr –y, yctr +x, 1);
putpixel(xctr +y, yctr –x, 1);
putpixel(xctr –y, yctr –x, 1);
getch();
}
Example Result Output Computer Graphics
Enter the centre point:
400
200
Enter the radius:
100
Output
Self Assessment Questions
6. Crucial to this definition is the fact that every simple closed curve admits a well-defined
interior Closed curves can be classified as negatively oriented …………………….
(a) counter clockwise (b) clockwise
(c) Both (a) and (b) (d) None of these
60 LOVELY PROFESSIONAL UNIVERSITY