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

Scan-Converting Circles

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 3
أستاذ المادة رسل محمد نعمة       28/02/2017 03:17:55
Computer Graphics Lecture 4/ 3rd Class /2016-2017
Scan-Converting Circles Since the circle is a frequently used component in pictures and graphs, a procedure for generating either full circles or circular arcs is included in most graphics packages. Because of the high symmetry of the circle, it is possible to scan-convert it in many ways.
A circle is defined as the set of points that are all at a given distance r from a center position (x, y) This distance relationship is expressed in Cartesian coordinates as:
x 2 + y 2 = r2
Obvious Methods Obvious methods for scan-converting a circle are easy to derive and to implement but are slow and inefficient. The first obvious method is based on the Cartesian equation of a circle x2+y2 = R2, which yields y=?R2 ? x2. This expression is used in the loop below to determine one quarter of the circle, which is then duplicated to complete the circle.
Algorithm 1: Circle using Cartesian equation Inputs: (x, y) circle center , R the radios Begin for x=0 to R do y=sqrt(R*R - x*x ) plot(x,y), plot(-x,y), plot(x,-y), plot(-x,-y) end
The method is slow, but a more important drawback is that the pixels are not uniformly distributed over the quarter circle. This is a result of the equal x increments of the loop figure below:


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