prev

next

out of 2

Published on

16-Dec-2015View

214Download

0

DESCRIPTION

Computer graphics lal manual

Transcript

<ul><li><p>Draw a line using Bresenham Line Algorithm. </p><p>#include </p><p>#include </p><p>#include </p><p>#include </p><p>void main() </p><p>{ </p><p> int gd=DETECT,gm; </p><p> int x,y,x1,y1,xn,yn,d,dx,dy,m; </p><p> initgraph(&gd,&gm,"c:\\BGI"); </p><p> outtextxy(150,10, "Bresenham line drawing algorithm Www.Bcanotes.com"); </p><p> cout</p></li><li><p> y=y1; </p><p> while((x</p></li></ul>

Recommended

The Bresenham and Pitteway Algorithms - Oberlin College bob/cs357/ Bresenham and Pitteway Algorithms Bresenham’s algorithm finds the pixels covered by a line, using only integer arithmetic. Pitteway finds the same pixels and also the intensities needed to anti-alias the line when it is usedDocuments