Defining a circle using Polar Co-ordinates :The second method of defining a circle makes use of polar coordinates as shown in fig: x=r cos θ y = r sin θ Algorithm:Step1: Set the initial variables: r = circle radius Step2: If θ>θendthen stop. Step3: Compute x = r * cos θ y=r*sin?θStep4: Plot the eight points, found by symmetry i.e., the center (h, k), at the current (x, y) coordinates. Plot (x + h, y +k) Plot (-x + h, -y + k) Step5: Increment θ=θ+i Step6: Go to step (ii). Program to draw a circle using Polar Coordinates:Output: Next TopicBresenham's Circle Algorithm |