
Cantata(HELP)                Khoros                 Cantata(HELP)

     CREATING A CANTATA PROGRAM

     The following is an introductory tutorial designed to
     acquaint the user with the fundamentals of using cantata.
     At the end of this section, there is information provided on
     example workspaces files.

     Input
        Click and hold the mouse key on the `INPUT SOURCES' sub-
        form menu button near the top middle of the cantata mas-
        ter form.  A menu will "drop down" beneath the button.
        Slide the mouse down to highlight `Input Data File' then
        release the key.  If your window manager does not auto
        place, the outline of a window will appear on the screen
        to be positioned with a mouse click.  This is the subform
        for `Input Data Files'.  A list of standard input
        `Images' will be shown in the pane to the right, with
        `ball.xv' selected.  Click on the `Glyph' button in the
        upper left corner of the window.  The subform will be
        replaced by the `images' glyph icon.

     Output
        Repeat the above procedure with the `OUTPUT' button,
        selecting the `Display Image' subform.  The `Display With
        Update' pane should be shown on the subform.  "Glyphing"
        the subform replaces it with the `put_update' glyph.  The
        glyphs may be repositioned on the workspace by dragging
        (click and hold the mouse on a clear spot on the glyph,
        move to desired position, and release).

     Connections
        Click the mouse first on the black output arrow of the
        `images' glyph, then click on the black input arrow of
        the `put_update' glyph (or visa versa).  A line should
        appear connecting the two glyphs.  Open the `put_update'
        glyph back to the subform by clicking on the top, middle
        button on the glyph (representing the subform).  The name
        of the selected `KHOROS_HOME/data/images/ball.xv' should
        now appear in the `Input Image' field.  `Glyph' the sub-
        form again.

     Execution
        Execute `put_update' by clicking on the "light-switch"
        run button in the upper right corner of the glyph.  The
        glyph will reverse video to indicate that the process is
        running, and the "light-switch" will invert to the oppo-
        site position (becoming a stop button).  After a few
        moments, the image outline will appear on the screen (or
        will need to be placed with a mouse click). The displayed
        image may be removed by either clicking on the inverted
        "light-switch" or clicking within the image itself.

     Adding to the Program
        Click on the `IMAGE PROCESSING' menu button and select
        the the `Geometric Manip.' subform entry.  Note that the
        `Shrink Image' routine is currently displayed with a
        `Shrink Factor' of `2'.  Glyph the subform and connect
        the output of `images' to the input of `vshrink', and the
        output of `vshrink' to the input of `put_update'.  Note
        that this redefines the input to `put_update'.  We could
        now run the individual glyphs, as before, but instead,
        let's execute the entire program using the `RUN' action
        button to the left of the workspace.  A smaller version
        of ball.xv should be displayed.

        Remove the displayed image and try changing the `Shrink
        Factor' and Rerun the program.

     Deleting Glyphs
        Glyphs may be removed from the workspace by clicking on
        the "bomb" kill button in the upper left corner of the
        glyph.  This is equivalent to clicking on the `QUIT' but-
        ton on the corresponding subform.

     Exit from cantata
        You may leave the cantata visual programming environment
        by clicking on the `QUIT' button (lower left edge of
        workspace).  Unless the workspace is empty, you will be
        prompted if you wish to SAVE the contents of the
        workspace before quitting (or CANCEL and return to the
        workspace).

     EXAMPLE WORKSPACES AND DEMO

     As when learning any new programming language, a few exam-
     ples can be very helpful.  In the directory,

          KHOROS_HOME/repos/workspace

     you will find several directories of previously saved
     workspaces.  Start by trying those in the "examples" direc-
     tory.  Execute the following command:

     % cantata -restore $KHOROS_HOME/repos/workspace/examples/example1.Z

     Copyright 1991, University of New Mexico. All rights
     reserved.

Khoros                    Release: 1.0                          1

