انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Bresenham’s Line Generation

Share |
الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 3
أستاذ المادة توفيق عبد الخالق عباس الاسدي       13/12/2016 06:23:30
The Bresenham algorithm is another incremental scan conversion algorithm. The big advantage of this algorithm is that, it uses only integer calculations.
Difference Between DDA Line Drawing Algorithm and Bresenhams Line Drawing Algorithm.
Digital Differential Analyzer Bresenhams Line Drawing Algorithm
Arithmetic
DDA algorithm uses floating points i.e. Real Arithmetic. Bresenhams algorithm uses fixed points i.e. Integer Arithmetic.
Operations
DDA algorithm uses multiplication and division in its operations. Bresenhams algorithm uses only subtraction and addition in its operations.
2
Speed
DDA algorithm is rather slowly than Bresenhams algorithm in line drawing because it uses real arithmetic (floating-point operations). Bresenhams algorithm is faster than DDA algorithm in line drawing because it performs only addition and subtraction in its calculation and uses only integer arithmetic so it runs significantly faster.
Accuracy & Efficiency DDA algorithm is not as accurate and efficient as Bresenham algorithm. Bresenhams algorithm is more efficient and much accurate than DDA algorithm.
Drawing
DDA algorithm can draw circles and curves but that are not as accurate as Bresenhams algorithm. Bresenhams algorithm can draw circles and curves with much more accuracy than DDA algorithm.
Round Off
DDA algorithm round off the coordinates to integer that is nearest to the line. Bresenhams algorithm does not round off but takes the incremental value in its operation.
Expensive
DDA algorithm uses an enormous number of floatingpoint multiplications so it is expensive. Bresenhams algorithm is less expensive than DDA algorithm as it uses only addition and subtraction.
Moving across the x axis in unit intervals and at each step choose between two different y coordinates.
For example, as shown in the following illustration, from position (2, 3) you need to choose between (3, 3) and (3, 4). You would like the point that is closer to the original line.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم