function drawCircle(P,r)
% This function draw a circle centered at "P" with radius "r"
% Input:
%       P - center of the circle
%       r - radius of the circle


    xCenter = P(1);
    yCenter = P(2);
      theta = 0 : 0.01 : 2 * pi;
     radius = r;
          x = radius * cos(theta) + xCenter;
          y = radius * sin(theta) + yCenter;
     circle = [x; y]'; 
          
    plot(circle(:, 1), circle(:, 2),'r-'); hold on
%     plot(P(1), P(2),'r*');
    
end