HELP SIM_FACES                                   Aaron Sloman March 1999

LIB SIM_FACES
(Based on LIB RCLIB)

To use this do
    uses rclib
    uses sim_faces

The SIM_FACES library employs the methods introduced in the tutorial
file TEACH FACES, using colour blobs and blocks to compose a picture of
a cartoon-style face which may be happy, glum, surprised, etc. Note that
no claim is made about the psychology of facial expressions. This
library is available entirely for the purposes of supporting teaching
and simple demonstrations, which may be educational and entertaining.

The SIM_FACES library is used in TEACH SIM_FEELINGS to enable simple
demonstration agents to display different facial expressions according
to how they "feel".

At present, the library provides five face drawing procedures, each of
which is invoked in this format:

FACE_TYPE(x, y, face_rad, col, eye_rad, mouth, eyesep, eyecol, mouthcol);

Where

    FACE_TYPE is the procedure, currently one of:

        neutral_face, surprised_face, happy_face,
        glum_face,    frustrated_face

    x and y (numbers) give coordinates of the centre of the face

    face_rad (a number) is the diameter of the bounding circle

    col (a string) gives the colour of the main circle

    eye_rad (a number) gives the radius of each eye

    mouth (a number) gives the radius of the mouth or half its width

    eyesep (a number) is the distance between centres of the eyes

    eyecol (a string) is the colour of the eyes

    mouthcol (a string) is the colour of the mouth


In addition, there is a mixin, to be used with objects that have faces
to be drawn:

define :mixin face_pic;
    ;;; A mixin for objects with faces

    ;;; Window in which to show the objects's face
    slot face_window = "faces_window";

    ;;; The face colour
    slot face_colour;

    ;;; Where to draw facial expression, and what size
    slot face_xloc;
    slot face_yloc;
    slot face_rad = 40;
    slot face_margin = 10;

enddefine;

And a method:

define :method sim_draw_face(thing:face_pic, feeling);


;;; Test the drawing commands, defined below.
rc_start();

;;; FACE_TYPE(x, y, face_rad, col, eye_rad, mouth, eyesep, eyecol, mouthcol);

neutral_face(-90, 90, 60, 'red', 15, 24, 50, ,'blue','white');

surprised_face(-90, -90, 60, 'red', 15, 24, 50, 'blue','white');

happy_face(90, 90, 60, 'red', 15, 24, 50, 'blue','white');

glum_face(90, -90, 60, 'red', 15, 24, 50,'blue','white');

frustrated_face(0, 0, 60, 'red', 15, 24, 50,'blue','white');



Exercise:
Define some more face types suitable for use in such a library.

If you produce some nice examples using the same general methods, and
the same invocation format, please email the code, with any required
documentation, to

    A.Sloman@cs.bham.ac.uk

If appropriate, I'll add them to the library.

--- $poplocal/local/sim/help/sim_faces
--- Copyright University of Birmingham 1999. All rights reserved. ------
