Alpha_1 User's Manual


Getting Started with Unix

This document explains how to get started using Alpha_1. Alpha_1 is run on workstations using the Unix operating system plus a few freely available application packages. This document tells you how to get set up to start using Alpha_1 with respect to these packges. In particular there are three applications that will be discussed: Unix C-shell, the X window system, and GNU emacs. Some familiarity with the Unix operating system is assumed in this document.

The Unix Shell

Using Alpha_1 requires some minor modifications to the initialization of your Unix shell (csh or sh derivative). This section will present examples appropriate for the csh.

If you are setting up your system to use in the cadelab, for CS579, there is simular information on how to change your set up on the CS 579 home page, Getting Started, Setting up Dot Files.

Otherwise...

First of all you will need to set the environment variable A1ROOT to be the root of the Alpha_1 distribution. At Utah, this is typically /usr/local/apps/alpha1. For example, add this line to your .customs.cshrc file:

	setenv A1ROOT /usr/local/apps/alpha1
In this document we will refer to the root of the Alpha_1 distribution as $A1ROOT. (Consult your system administrator for the location at your site.)

Next, your .customs.cshrc file must contain the following: If you do not already have a .customs.cshrc, then create one.

##
## add the alpha 1 stuff (if in interactive mode)
##
if ($?prompt) then
    setenv A1_QUIET yes
    if ( -e $A1ROOT/cmds/set-envars ) then
       
            source $A1ROOT/cmds/exec-envars
            set path = ( $a1bin $path /usr/local/apps/urt/bin )
            echo ""
         else
            echo "No Alpha_1."
    endif
endif

This files sets a few more environment variables for runtime reference.

Note, the "set path "... adds the Alpha_1 binary program directory to your path variable. For convenience, the the exec-envars file sets the environment variable a1bin to the approriate directory ($A1ROOT/bin). The "set path" command sets your path so that your shell will search the Alpha_1 program directory ($a1bin) when you give a command. The form shown above makes sure that whatever you had already set on your path remains.

Unix Man Pages

Alpha_1 provides some brief "man" pages for the Unix online man program. To reference these pages you need to add $A1ROOT/man to your MANPATH environment variable (usually set in your .cshrc or .login file). Use man alpha1 to get started.

The X Window System

Alpha_1 uses the X Window System, the Motif toolkit, and some vendor-specific libraries for interactive graphics. The exec-envars script sets up defaults for Alpha_1 X/Motif programs and no changes are required to your personal X setup.

You may want to modify the X resources associated with Alpha_1 programs. To do so, see the supplemental document: X/Motif Defaults.

GNU Emacs

An important part of using the Alpha_1 system for serious modeling efforts is an emacs text editor (version 19 recommended), although it is not strictly necessary. Access to c_shape_edit (the central interactive modeling program in Alpha_1), as well as the Unix shell is available from within emacs. Using emacs to access these programs allows simple recording and editing of commands as they are executed, since the text is typed into a buffer and then executed. Emacs has an extensive online help facility which you can access by typing "control-H."

Alpha_1 provides an emacs extention for a modeling mode called scl-mode for the c_shape_edit program. This mode is entered automatically when you visit a file with a ".scl" suffix (shape_edit command language). For a complete description of using c_shape_edit with emacs, see the GNU Emacs SCL Mode document.

In order to use the Alpha_1 emacs extensions, you must modify your personal .emacs file to load them. To do so, add the following lines:

(condition-case ()
    (load (concat (getenv "A1ROOT") "/emacs/a1"))
  (error (message "Can't load a1.el")))
This assumes you have modified your Unix shell setup as described above.

Testing Your Setup

After you have modified your Unix setup files you should log out and log back in to test them. Try the following to test your setup:
csh 1> aprint ray
csh 2> man alpha1
The first command will print the defaults associated with the Alpha_1 ray tracing program ray. The second command should show the overview man page for Alpha_1.

To test the emacs extensions, start emacs and visit an SCL file, test.scl, for example. The mode line should display Scl and there should be an SCL menu (in emacs 19) in the menu bar.

Now see the Alpha_1 Tutorial to try some modeling and graphics in Alpha_1.


Alpha_1 User's Manual Home Page
Alpha_1 User's Manual. Version 98.01.
Copyright © 1998, University of Utah
a1-web@gr.cs.utah.edu