Monday, June 29, 2015

Computer Graphics : Digital Differential Algorithm (DDA)


We don't have this in the lab exercise, but if you haven't done Bresenham line algorithm, you could start with this, then do Bresenham algorithm.

Anyways, if you try it, it's just good to see how this works too. You might not see much difference when compared to Bresenham, based on accuracy and stuff...at least I couldn't...may be I should run them both with same input and keep the output windows nearby and try to check the difference, and use some magnifying glass too probably...:P

You should try it! And this algorithm considers negative slope also, so code for that and the code should work even if the two points are given as input in different order, like point A first then point B or vice versa. It's obvious, still, just reminding you.

I was planning to post the code, since it's not a lab exercise, but since I asked you to try it, first try. And if you don't get it, mail me and I will help you with your code :) and later, may be I will provide my code if necessary.
 


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.