Page 60 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 60

Lab on Computer Graphics



                   Notes         Properties of a Circle
                                 Centre         A point inside the circle. All points on the circle are equidistant (same distance)
                                                from the centre point.
                                 Radius         The radius is the distance from the centre to any point on the circle. It is half
                                                the diameter.
                                 Diameter       The distance across the circle. The length of any chord passing through the
                                                centre. It is twice the radius.
                                 Circumference   The circumference is the distance around the circle.
                                 Area           Strictly speaking a circle is a line, and so has no area. What is usually meant
                                                is the area of the region enclosed by the circle.
                                 Chord          A line segment linking any two points on a circle.
                                 Tangent        A line passing a circle and touching it at just one point.

                                 Secant         A line that intersects a circle at two points.

                                 4.1 Concept of Circle Algorithm

                                 A circle is a geometrical structure, and is not of much use in algebra, because the equation of a
                                 circle is not a function. But you may require working with circle equations. In “primitive” terms,
                                 a circle is the shape formed in the sand by driving a stick (the “center”) into the sand, putting
                                 a loop of string around the center, pulling that loop taut with another stick, and dragging that
                                 second stick through the sand at the further extent of the loop of string. The resulting figure
                                 drawn in the sand is a circle.
                                 It is known that a circle can be divided into 360 degrees. When looking at the circle it is obvious
                                 that the circle is symmetric with regard to the co-ordinate axis x and y and the axes of quadrants
                                 as well (function x = y and x = – y). It holds for the circle with a centre in (0, 0), that if a point
                                 (x, y) lies on the circle, then the points (y, x), (y, –x), (x, –y), (–x, –y), (–y, –x), (–y, x) and (–x, y)
                                 lie also on the circle. For defining all the point on the circle, it is sufficient to compute 1/8th of
                                 the arc of the circle. In algebraic terms, a circle is the set of points (x, y) at some fixed distance
                                 r from some fixed point (h, k). The value of r is called the “radius” of the circle, and the point
                                 (h, k) is called the “centre” of the circle.

                                 The “general” equation of a circle is:
                                                   2
                                                  x  + y  + Dx + Ey + F =  0
                                                       2
                                 The “centre-radius” form of the equation is:
                                                      (x – h)  + (y – k)  =  r 2
                                                           2
                                                                   2
                                 where the h and the k come from the centre point (h, k) and the r  comes from the radius value
                                                                                     2
                                 r. If the centre is at the origin, so (h, k) = (0, 0), then the equation simplifies to x  + y  = r .
                                                                                                  2
                                                                                                         2
                                                                                                     2
                                 You  can  convert  the  “centre-radius”  form  of  the  circle  equation  into  the  “general”  form  by
                                 multiplying things out and simplifying; you can convert in the other direction by completing
                                 the square.
                                 The centre-radius form of the circle equation comes directly from the Distance Formula and
                                 the definition of a circle. If the centre of a circle is the point (h, k) and the radius is length r,
                                 then every point (x, y) on the circle is distance r from the point (h, k). Plugging this information
                                 into the Distance Formula (using r for the distance between the points and the centre), we get:




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