Page 59 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 59

Unit 4: Implementing Circle Algorithm
            Avinash Bhagat, Lovely Professional University


                         Unit 4: Implementing Circle Algorithm                                    Notes



             CONTENTS

             Objectives
             Introduction
             4.1   Concept of Circle Algorithm
             4.2   Midpoint Circle Drawing Algorithm
                  4.2.1   Implement Midpoint Algorithm
                  4.2.2   Implement Midpoint Circle Drawing Algorithm in C
                  4.2.3   Advantage and Disadvantage of Midpoints Circle Drawing Algorithm
             4.3   Bresenham’s Circle Drawing Algorithm
                  4.3.1   Bresenham’s Circle Drawing Algorithm Using C Programming
             4.4  Summary
             4.5  Keywords
             4.6   Review Questions
             4.7   Further Readings

            Objectives


            After studying this unit, you will be able to:
               •  Understand the concept of circle algorithm
               •  Define the midpoint circle drawing algorithm

               •  Discuss the Bresenham’s circle drawing algorithm

            Introduction

            Critical to this definition is the detail that every simple closed curve declares a well-defined
            interior; that follows from the Jordan Curve Theorem. All simple closed curves can be classified
            as negatively oriented (clockwise), absolutely oriented (counterclockwise), or non-orient able. A
            circle oriented counterclockwise is an example of a positively oriented curve. The same circle
            oriented clockwise would be a negatively oriented curve.

            The concept of orientation of a curve is just a particular case of the notion of orientation of a
            manifold (that is, besides orientation of a curve one may also speak of orientation of a surface,
            hyper surface, etc.). Here, the interior and the exterior of a curve both inherit the usual orientation
            of the plane. The positive orientation on the curve is then the orientation it inherits as the
            boundary of its interior; the negative orientation is inherited from the exterior. A line forming
            a closed loop, every point on which is a fixed distance from a center point.

            A circle is a type of line. Imagine a straight line segment that is bent around until its ends join.
            Then arrange that loop until it is exactly circular - that is, all points along that line are the same
            distance from a centre point. There is a difference between a circle and a disk. A circle is a line,
            and so, for example, has no area - just as a line has no area. A disk however is a round portion
            of a plane which has a circular outline. If you draw a circle on paper and cut it out, the round
            piece is a disk.



                                             LOVELY PROFESSIONAL UNIVERSITY                                    53
   54   55   56   57   58   59   60   61   62   63   64