X Starter Toolkit

The X Starter Toolkit is a library of functions and a drawing widget that allow for a simple programming style (for example put_line(x1, y1, x2, y2)) without having to worry about widgets and the like. While the toolkit by itself lets you write simple programs in X, it can also be mixed with Xt and Xlib functions when you need to write more complex programs. The word Starter emphasizes the two roles of the toolkit. You can use it to start programming in X and also as a prototyping tool. See world1.c, world2.c, and world3.c for three successively more complex programs.

The toolkit has been used to support teaching an introductory course in interactive computer graphics as well as research in image analysis and image processing.

There are two major differences between the Starter Toolkit and Tk: (1) The Starter Toolkit emphasizes interactive drawing and imaging operations rather than GUIs. It offers limited facilities for selection menus and panels by providing function wrappers for some of the Motif (or OLIT, or Athena) functions. (2) Tk is written directly on top of Xlib - The Starter Toolkit is written on top of Xt, hence it is easy to mix it with other X facilities.

You can get the toolkit from

ftp.cs.sunysb.edu:/pub/TechReports/pavlidis/Xstart

The directory contains these files:

Examples

The following files provide examples of the use of the toolkit.

spiral.c: Spiral drawing. (31 lines) ----------------->

hist.c: Histogram plotter. Reads stdin for number to plot,
one integer per line. (53 lines)

polydraw1.c: Rubber Band Polygon. (42 lines)

**

paint3.c: Pixel doodling. (126 lines) Click here for a sample screen.

fzoom.c Simple 3D Animation. (67 lines)

nvst.c: Nervous text. (85 lines) This program produces jumping letters, similar to those of the popular Java example. You may wish to compare the source for the two programs. (Click here for the Java source) The Starter Toolkit version takes into account the variable character width, the Java version assumes fixed width.

calc.c: Graphical front end for Unix dc calculator. (173 lines) Sample below left.

(The above are just screen dumps. No Starter Toolkit for Java yet.)

pie.c: Mixing St and Xlib calls to create a rainbow pizza pie. (27 lines) Sample above right.

clip.c: Mixing St and Xlib calls to illustrate polygon clipping. (68 lines)

planets.c Simple simulation of planets and comets, icluding collisions.
(304 lines) --------------------------------------->

**

Student Projects

The following are larger programs written as part of course projects (one semester).

Car Race by Chi Hung Chan (1995)

Fly Over by Carmine T. Guida (1996)