Arc/Circle

An Arc or Circle is another important entity in Computational Geometry. A circle is set of infinite points at equal distance from a given point. This point is called as Centre of the circle and the distance between Centre and any point is called as radius of the circle.

Computational Geometry Library in Python – Arc/Circle:

class CGLibPy_Arc(object):
    centrePt = None
    startPt = None
    endPt = None
    radius = 0.0
    startAng = 0.0
    endAng = 0.0
    sweepAng = 0.0
    fullCircle = False
    CCW = True

    def __init__(self,_args):
        if len(_args) == 3: #Circle - Centre, radius, Orientation
            self.centrePt = _args[0]
            self.radius = _args[1]
            self.CCW = _args[2]
            self.fullCircle = True
        elif len(_args) == 5: #Arc - Centre, Start Pt, End Pt, radius, Orientation
            self.centrePt = _args[0]
            self.startPt = _args[1]
            self.endPt = _args[2]
            self.radius = _args[3]
            self.CCW = _args[4]
Circle, Centre and Radius

An arc is nothing but a subset of a Full Circle. Any Arc or Circle has two directions either Clockwise (CW) or Counter Clockwise (CCW)

CW and CCW directions

An Arc is defined by a Centre, Radius a Start Point and an End Point. The angle between Start Point and End Point is called Sweep Angle.

Basics of an Arc