bresenham's algorithm line drawing
Posted Date Unknown Jithin Mohanan 1 Comment

how bresenham's algorithm for line drawing working?

See All Responses Below...
Author
Message Rating
Posted on: 20/05/2012
Bresenham's algorithm works with the use of a decision parameter. In the case of positive slope, X value will increase at unit interval of time. And if decision parameter is less than zero then Y value will take previous Y value, otherwise Y value is Y+1.

If P is the decision parameter then initial decision parameter Po is calculated by 2dy-dx, where dx = x2-x1 and  dy=y2- y1,
where the end points of required line is (x1,y1) and (x2,y2).

If P<0 then next P+1 value is calculated by P +2dy

If p>=0 then next P+1 value is calculated by P+2dy-2dx
Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
   Design  HTML
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud