Amazon Affiliate

Tuesday 25 June 2013

Derivation, Algorithm and Drawback of PSEUDO CIRCLE DRAWING Algorithm.

Derivation, Algorithm and Drawback of  PSEUDO CIRCLE DRAWING Algorithm.


DERIVATION :

                            The locus of all those points that are situated at equal distance from a fixed point (Xc , Yc).

(X - Xc)2 + (Y - Yc)2 = r2

Y = Yc + sqrt(r2 – (X - Xc)2)

Y = Yc - sqrt(r2 – (X - Xc)2)

Xc – r <= X <= Xc + r




ALGORITHM OF PSEUDO CIRCLE DRAWING :


Begin :

              Read (Xc , Yc ) and r

              X = X-r , Y = Yc

              while(X <= Xc+r)

              {

                   plotpoint (X , Yc + sqrt(r2 – (X - Xc)2) )   
                   plotpoint (X , Yc - sqrt(r2 – (X - Xc)2) )

                   X++

              }

End




DRAWBACK OF PSEUDO CIRCLE DRAWING:


  •     Round of error.
  •    Floating point operation.
  •    Stair case output.

No comments:

Post a Comment