figure
% Draw the head
rectangle(‘Position’, [0.5 1 2 2], ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
hold on;
% Draw the ears
rectangle(‘Position’, [0.5 2.5 0.5 0.5], ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, [2 2.5 0.5 0.5], ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
% Draw the eyes
rectangle(‘Position’, [1 1.75 0.5 0.5], ‘Curvature’, [1 1], ‘FaceColor’, ‘w’);
rectangle(‘Position’, [2 1.75 0.5 0.5], ‘Curvature’, [1 1], ‘FaceColor’, ‘w’);
% Draw the pupils
rectangle(‘Position’, [1.25 1.95 0.1 0.1], ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, [2.25 1.95 0.1 0.1], ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
% Draw the nose
line([1.75 2.25], [1.75 1.75], ‘LineWidth’, 2, ‘Color’, ‘k’);
line([1.75 1.75], [1.75 1.5], ‘LineWidth’, 2, ‘Color’, ‘k’);
% Draw the mouth
line([1.5 2], [1.35 1.35], ‘LineWidth’, 2, ‘Color’, ‘w’);
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.