function draw_smile(r,x0,y0,line_style)
% draw_smille  Draw a simple smiley face in the (x,y) plane
%
% Synopsis:  draw_smile(r)
%            draw_smile(r,x0)
%            draw_smile(r,x0,y0)
%
% Input:  r = radius of the face
%         x0,y0 = x and y coordinates of the center of the face
%                 Default:  x0 = 0,  y0 = 0;

if nargin<2, x0 = 0;  end
if nargin<3, y0 = 0;  end
if nargin<4, line_style = '-';  end

% -- Draw the outline
drawCircle(r,x0,y0,line_style);
hold('on')

% -- Draw the eyes
reye = 0.08*r;               %  Radius of each eye
reye_loc = 0.55*r;           %  Radial distance of each eye from center
alpha_e = 40.0*pi/180.0;     %  Angle defining location of each eye
                             %  relative to horizontal, and in radians

xec = x0 + reye_loc*cos(alpha_e);     %  x location of the right eye
yec = y0 + reye_loc*sin(alpha_e);     %  y location of the right eye
drawCircle(reye,xec,yec,line_style);

xec = x0 - reye_loc*cos(alpha_e);     %  x location of the left eye
drawCircle(reye,xec,yec,line_style);

% -- Draw the smile
beta_s = 30*pi/180.0;       %  Angle defining beginning and ending of smile
rsmile = 0.55*r;            %  Radial distance of smile from the center

theta = linspace( (pi+beta_s), (2*pi-beta_s) );
xs = x0 + rsmile*cos(theta);
ys = y0 + rsmile*sin(theta);
plot(xs,ys,line_style)
hold('off');

end