• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D19-May-201512 32

EXTERNSH A D19-May-20152.9 KiB11987

MakefileH A D03-May-20223 KiB10973

READMEH A D19-May-201516.7 KiB410335

README.BH A D19-May-201516.2 KiB701510

bench.cH A D19-May-201535.6 KiB1,2201,046

browser.cH A D19-May-201530.9 KiB1,2181,007

cgm.cH A D19-May-201544.2 KiB1,4991,156

cgm.hH A D19-May-20153.4 KiB9943

cgmin.cH A D19-May-201569 KiB2,4882,095

cgmin.hH A D19-May-2015738 3014

clip.cH A D19-May-201522.4 KiB800570

clip.hH A D19-May-20151.9 KiB6821

draw.cH A D19-May-201560.5 KiB2,1791,690

draw.hH A D19-May-20159.9 KiB258166

draw0.cH A D19-May-201539.2 KiB1,4531,256

engine.cH A D19-May-201519.8 KiB702506

engine.hH A D19-May-20156.2 KiB15978

eps.cH A D19-May-201523.4 KiB750600

eps.hH A D19-May-2015469 216

gcntr.cH A D19-May-201534.9 KiB1,023588

gist.cH A D19-May-201539.3 KiB1,4201,083

gist.hH A D19-May-201541.1 KiB951363

gread.cH A D19-May-201525.3 KiB900702

gtext.cH A D19-May-20151.8 KiB6939

gtext.hH A D19-May-20151.7 KiB4412

hlevel.cH A D19-May-201511.8 KiB470368

hlevel.hH A D19-May-20155.6 KiB13754

ps.cH A D19-May-201542 KiB1,4201,166

ps.hH A D19-May-20152.3 KiB7841

tick.cH A D19-May-201541.6 KiB1,304983

tick60.cH A D19-May-20153.6 KiB134101

xbasic.cH A D19-May-201547.9 KiB1,7501,422

xbasic.hH A D19-May-20154.5 KiB11055

xfancy.cH A D19-May-201528.3 KiB965811

xfancy.hH A D19-May-20153.4 KiB7827

README

1
2		GIST - A Scientific Graphics Package
3			For UNIX Workstations
4
5
6------------------------------------------------------------------------------
7   $Id: README,v 1.1 2005-09-18 22:04:19 dhmunro Exp $
8
9------------------------------------------------------------------------------
10Features:
11
121) Three levels of graphics functions:
13	 P (primitives), A (advanced), and D (display list)
14   Routines are provided for creating and editing display list elements.
15   When a display list is rendered, calls to the advanced and primitive
16   graphics functions are generated.  `A' level functions call `P' level
17   functions.
18	A few functions are provided at a fourth level, H (high level),
19   which embodies the control functions described in the suggested
20   interactive interface below.
21
222) The `P' level functions call virtual rendering functions for all
23   active graphics `engines'.  Three types of engines are provided:
24
25      X Window System engines- draw to an X Window.  If the `D' level
26         Gist routines have been used to construct a display list, then
27         a Gist X engine can redraw itself if it is damaged by X exposure
28         events.
29
30      PostScript engines- output to a PostScript file which can be sent
31         to many printers directly.
32
33      CGM engines- output to a binary CGM metafile to allow for archiving
34         large numbers of graphics frames for which PostScript output
35         is too disk-intensive.
36
37   Additional types of engines can be added by supplying virtual functions
38   for the six graphical primitives (DrawLines, DrawMarkers, DrawText,
39   DrawFill, DrawCells, and DrawDisjoint), and a half dozen additional
40   control functions to perform actions such as destroying the engine,
41   changing coordinate transformations, advancing to a new page, etc.
42   Input to the rendering functions is in floating point coordinates,
43   with a coordinate transformation.  Gist supplies most of the functions
44   you should need to convert these into device coordinates.  Input to
45   the primitives has already been clipped to the current viewport.
46
47   Care has been taken to assure that only those engines which your code
48   actually uses will be linked.
49
503) The `D' and `A' level routines render the following types of objects:
51
52     Decorated lines:  Open or closed polylines in several linestyles,
53                       with any width or color, optionally including
54                       overstruck occasional marker characters or
55                       ray arrows.
56
57     Quadrilateral meshes:  May have arbitrary logical holes (missing
58                            zones), and you may optionally draw individual
59                            regions or region boundaries (instead of the
60                            full mesh).  In addition to mesh lines, there
61                            are three other display list elements which
62                            can be used to show information about
63                            quadrilateral meshes:
64
65        Contours:  Trace level curves.  Mesh triangulation may be specified.
66        Vectors:  Filled or hollow vector arrows at each mesh point.
67        Filled Mesh:  The color of each zone reflects the value of a
68                      function-- an alternative to contour plots.
69
70     Images:  Implemented as cell arrays, so the image cell size can be
71              easily changed.
72
73     Text:  Supports Courier, Times, Helvetica, Symbol, and New Century
74            Schoolbook fonts on all devices (the X versions of these are
75            supplied with the MIT R4 release).
76
77     Axis ticks and labels:  Linear and logarithmic "rulers" appropriately
78            labeled.  Ticks always at "nice" numbers (i.e.- numbers ending
79            with 0, 1, 2, or 5) of labeled ticks and minor ticks adjustable.
80            Tick lengths and number of tick levels in the ruler hierarchy
81            adjustable.  Optional grid lines.  Axes can be drawn on any
82            or all four sides of a plot, or at a "nice" intermediate
83            position (to get x and y axes interior to the plot).  Provision
84            for scales with extremely small fractional variation (and
85            therefore extremely long tick labels).
86
874) Gist provides a browser, "gist", for its CGM metafiles (it is not
88   sufficiently general to handle any other metafiles, but, like the rest
89   of Gist, it is easy to port to any UNIX workstation).  The gist
90   browser can output pages in arbitrary order to an X window, a
91   PostScript file, another CGM file, or to an EPS file (for input to
92   FrameMaker).
93
94
95
96
97
98------------------------------------------------------------------------------
99Known problems:
100
101General note:
102The event-driven input dispatcher (dispat.c, dispas.c, dispax.c) is not
103very well designed.  The files events.[ch], osmem.c, ospoll.c, osterm.c,
104and ostime.c are a sketch of a better design; they are not currently
105used, but I'm working on it...
106
107   a) In Xlib.h, the style for declaring struct typedefs is an unhappy
108      one.  In particular, the HPUX 8.05 ANSI C compiler on HP 700
109      series machines issues a warning about the XImage data structure;
110      the complaint is that the declaration in Xlib.h reads:
111      typedef struct _XImage {
112        ...
113        (*VirtualFunction)(.., struct _XImage *, ..);
114      } XImage;
115      And when you pass this VirtualFunction an XImage*, the compiler
116      complains that an XImage* pointer shouldn't be cast to a
117      struct _XImage* pointer.  The correct thing to do is to get HP to
118      fix either Xlib.h, or to teach their compiler about this
119      programming style.
120
121   b) The HPUX 8.05 <stdio.h>, when _HPUX_SOURCE is defined, declares
122      and provides a prototype for the select function.  I therefore
123      removed my prototype (it returns an int, so it can be implicitly
124      declared).  However, there is a slight disagreement in argument
125      types which produces a warning message.
126
127   c) If you get a warning or error about the cuserid() function when
128      osys.c compiles, change the definition of D_CUSERID in the
129      Makefile and try again.
130
131   c) If you get a warning or error about the exp10() function when
132      the bench program loads, change the definition of D_HAS_EXP10
133      in the Makefile and try again.
134
135   e) A strict ANSI compiler will often produce reams of warnings from
136      subsidiary files included by Xlib.h.  Obviously, this is not my
137      problem.  If you have this problem, experiment with a simple code
138      which includes <X11/Xlib.h>, <X11/Xutil.h>, and <X11/Xos.h>, until
139      you have worked out a way to curb the warnings, or convinced
140      yourself that the warnings are harmless.
141
142
143
144
145------------------------------------------------------------------------------
146Suggested interactive interface (control functions are partially
147                                 implemented in hlevel.h, hlevel.c):
148
1491) Plotting functions:
150
151   plg, x, y
152   plg, y	Plot graph, with keywords to add markers, ray arrows, etc.
153     gistA.l=  ...linestyle...
154     gistA.dl= ...decorations...
155     gistA.m=  ...marker style...
156     gistD.hide= 0
157     gistD.legend= ...legend text...
158     GdLines(n, x, y)
159
160   plm, x, y, ireg
161   plm, x, y
162   plm		Plot mesh with optional zone region number array ireg
163     gistA.l=  ...linestyle...
164     gistA.mesh= ...(x, y, ireg)... (ireg can be NULL)
165     gistD.hide= 0
166     gistD.legend= ...legend text...
167     GdNewMesh(0)
168     GdMesh(region, boundary)
169
170   plc, z, x, y, ireg
171   plc, z	Plot contours of point-centered function z, with levs=
172                keyword to specify levels
173     gistA.l=  ...linestyle...
174     gistA.dl= ...decorations...
175     gistA.m=  ...marker style...
176     gistD.hide= 0
177     gistD.legend= ...legend text...
178     GdContours(z, triangulation, levels, nLevels)
179
180   plv, u, v, scale, x, y, ireg
181   plv, u, v, scale	Plot vector arrows
182     gistA.l=  ...linestyle (if hollow)...
183     gistA.f=  ...fill style (if filled)...
184     gistA.vect= ...vector style...
185     gistD.hide= 0
186     gistD.legend= ...legend text...
187     GdVectors(u, v, scale)
188
189   plf, colors, x, y, ireg
190   plf, colors	Plot filled mesh
191     gistD.hide= 0
192     gistD.legend= ...legend text...
193     GdFillMesh(colors)
194
195   pli, image, px, py, qx, qy
196   pli, image	Plot image (cell array)
197     gistD.hide= 0
198     gistD.legend= ...legend text...
199     GdCells(px, py, qx, qy, width, height, width, image)
200
201   plt, text, x0, y0	Plot text with keywords for font, size, alignment
202     gistD.hide= 0
203     gistD.legend= 0
204     gistA.t= ...text properties...
205     GdSetDrawing(current_drawing)  /* saves current coordinate system */
206     GdText(x0, y0, text)           /* (x0, y0) in NDC coordinates */
207     GdSetDrawing(0)                /* restore original coordinates */
208
209
2102) Coordinate systems:
211
212   {xmin, xmax, ymin, ymax, flags}= lquery()
213		Return the current limits and flags.  The actual values
214		of the limits after extreme value calculation and other
215		adjustments are returned.
216     GdGetLimits()
217
218   limits, xmin, ymin, xmax, ymax
219   limits, {xmin, xmax, ymin, ymax, flags}  /* returned by lquery */
220   limits, xmin, xmax
221   range, ymin, ymax
222		Set plot limits, can be numbers or "e" to get extreme
223		values.  Takes keywords nice=1 (to force ends of axes
224		to "nice" numbers), square=1 (to force dy=dx if any of
225		the limits are set to extreme values), and restrict=1
226		(to cause the extreme value search for x limits to
227		ignore any points outside of fixed y limits and vice
228		versa)
229     gistD.window= {xmin, xmax, ymin, ymax}
230     gistD.flags= {extreme, nice, square, restrict}
231     GdSetLimits()
232
233   logxy, xFlag, yFlag
234		Set or reset log axis scaling
235     gistD.flags= {xIsLog, yIsLog}
236     GdSetLimits()
237
238   coordsys, systemNumber
239		Set current coordinate system (for drawing styles with
240                multiple coordinate systems on the page)
241     GdGetSystem(systemNumber)
242
243
2443) Plot editing:
245
246   elementType= plquery(elementIndex, keywords=...)
247   elementType= plquery(keywords=...)
248		Get information about a display list element.  Keywords
249                can be any keyword legal in any of plotting commands, or
250                the name of any formal parameter name for those commands.
251                One additional keyword, level=levelIndex, allows selection
252                of individual contour levels.  Also takes default=1
253		keyword to retrieve current default styles.
254     GdGetElement(elementIndex)
255       maybe GdGetContour(levelIndex)
256
257   pledit, elementIndex_list, keywords=...
258   pledit, keywords=...
259		Edit values for one or more elements.  Keywords are same
260		as for plquery.  Some keywords do not make sense with
261		more than one elementIndex.
262     for (i=0 ; i<sizeof(elementIndex_list) ; i++)
263       GdGetElement(elementIndex_list[i])
264         maybe GdGetContour(levelIndex)
265       gistA.?= new value;  gistD.?= new value
266       GdEdit(0 or 1)
267
268
2694) Current window control functions:
270
271   about_to_wait_for_keyboard_input
272		Before pausing for keyboard input, the following Gist
273		sequence should be issued to assure that the current X
274		display is up-to-date:
275     GhBeforeWait()
276
277   fma		Frame advance.  Sends current drawing to all active
278		devices.  Optionally activates hardcopy device.
279		Optionally performs animation (see below).  If the
280		animation mode is not set, the Gist calls are:
281     GhFMA()
282
283   redraw	erase and redraw current X display
284     GhRedraw()
285
286   hcp		Send current X display to hardcopy file.  Takes optional
287		file= keyword to create a new output file.
288     GhHCP()
289
290   hcpon
291   hcpoff	Toggle whether fma activates/deactivates the
292		hardcopy engine.  There is no way to permanently activate
293		the hcp_engine interactively, avoiding problems with new
294		frames appearing for every interactive resetting of limits
295		or editing.  If no interactive pauses occur before the
296		fma, then full efficiency is attained; otherwise the
297		display list will be traversed once to send to the screen,
298		and a second time to send to hardcopy, just as for the
299		explicit hcp command.
300     GhFMAMode(1 or 0, 2)
301
302   animate, 0 or 1
303   animate	Toggle animation mode for the current coordinate system.
304		If all four limits are fixed, then only the viewport for
305		the system is animated, otherwise the viewport and its
306		ticks and labels are animated.  In this mode, the X engine
307		draws to an offscreen pixmap which "blits" to the screen
308		when the fma command is issued (see fma above).  Only one
309		coordinate system can be animated at a time (since there
310		usually IS only one, this is not much of a limitation).
311		When animate mode is turned on, the decision of whether
312		to animate the tick marks or just the viewport of the
313		current system is made depending on whether all four
314		limits are fixed.  When animation is turned on:
315     GhFMAMode(2, 0 or 1)
316
317   palette, r, g, b
318   palette, "standard_palette.gp"
319   palette, r, g, b, query=1
320		Set current color palette either from explicit (r, g, b)
321		arrays, or from a Gist palette file.  Takes ntsc=1
322		keyword if grays for monochrome output devices are to
323		be computed using NTSC TV standard rather than simple
324		intensity.  Takes query=1 keyword to output to (r, g, b).
325     GpSetPalette(x_display_engine, {r, g, b}, nColors)
326       GpGetPalette(x_display_engine, {r, g, b})
327       GpReadPalette(x_display_engine, "standard_palette.gp")
328
329   pllist, elementIndex_list
330   pllist	Prints list of legends at terminal.  Takes levels=1
331		keyword to print individual level legends.  This is
332		how you can determine the elementIndex for a given
333		display list element.
334     GdGetElement(elementIndex)    /* called in a loop */
335
336
3375) Multiple window control functions:
338
339   By default, you get one X window.  At the first use of the hcp command,
340   a metafile will be created.  By default, this is a CGM file with a
341   unique name, although both hcp and hcpon take a file= keyword to specify
342   the filename.  By default, hardcopy files are CGM files whose filename
343   will have ".cgm" appended (if not present).  You get a PostScript file
344   by explicitly specifying a filename ending with ".ps".  You can close
345   the existing file and not create a new one by specifying file="".
346
347   If you want, you can switch to a second or third X window.  The plotting
348   commands only deliver output to one X window at a time, but the other
349   windows remain visible, and you can reinstate them whenever you want.
350   Each X window has its own display list.  You can also have a display
351   list which is not associated with any X window-- only a hardcopy file.
352   Finally, each display list can have its own hardcopy file, which overrides
353   the default hardcopy file shared among all display lists.
354
355   All this is handled by two somewhat complicated functions:
356
357   pldevice, number     /* 0<= number < 8 */
358		Sets current display list to `number', if a display list
359		with this number already exists, or creates a new display
360		list with this number if there is none.  Takes keywords:
361      display= "host:server.screen"
362		Sets the display for X window.  Use "" to get no X window,
363		since if this keyword is omitted you get a window on
364		the display named by your DISPLAY environment variable.
365      file= "hcp_file"
366		Sets the name for the associated hardcopy file.  Use ""
367		to revert to the default hcp file.  If you don't specify
368		file= when creating a new display list, this is what you
369		get by default.
370      style= "standard_style"
371		Name of style file to use for specifying layout of drawing.
372		Default is "work.gs".  If you change this for an existing
373		display list (X window), its current contents are erased
374		as a side effect.
375      hcplegends= 0 or 1
376		Legends are not displayed in the X windows (use pllist);
377		this switch controls whether legends are written to the
378		hcp file.  Default is hcplegends=1.
379      dpi= 75 or 100
380		Resolution for the X window.  75 makes a small window; 100
381		is the default.
382
383   hcpdevice, file= "hcp_file"
384		Sets the default hardcopy device used by any display lists
385		which don't have their own hcp file as specified with
386		pldevice.  Use file="" to close the current file.  If there
387		is no default hcp file and an hcp command requires one,
388		a default CGM file with a unique name will be created
389		automatically.
390
391   If no explicit pldevice command is issued, the first plotting command
392   does an implicit "pldevice, 0", which brings up a local X window and
393   makes it the current output device.  The first hcp command then triggers
394   the creation of a hardcopy file as mentioned under the description
395   of hcpdevice.  To preempt this sequence, you must call pldevice
396   explicitly before plotting anything.  Use ` pldevice,0, display="" '
397   to plot without creating any X windows.
398
399
4006) Summary of interactive functions:
401     Plotting:     plg, plm, plc, plv, plf, pli, plt
402     Coordinates:  lquery, limits, range, logxy, coordsys
403     Editing:      plquery, pledit
404     Control:      fma, redraw, hcp, hcpon, hcpoff, animate, palette,
405		   pllist, plus implied screen update
406     Multiple:     pldevice, hcpdevice
407
408
409------------------------------------------------------------------------------
410

README.B

1
2      The BENCH program benchmarks and tests Gist
3
4      $Id: README.B,v 1.1 2005-09-18 22:04:20 dhmunro Exp $
5
6The execute line for the program is
7
8     bench [useps [host:server.screen]]
9
10where useps is 0 (the default) to use a CGM file as the hardcopy
11device, and 1 to use a PostScript file.  If the optional X display
12argument is not given, the Gist default is to use the DISPLAY
13environment variable, like other X programs.  (If you built bench
14with NO_XLIB, both arguments are ignored-- the "display" device is
15a CGM file, and the hardcopy device is a PostScript file.)  The
16output files, if any, will be "bench.ps" for PostScript output,
17and "bench.cgm" for CGM output.  (Gist automatically families large
18CGM files to about 1 Meg per file, so check for "benci.cgm",
19"bencj.cgm", etc.  The gist CGM browser automatically jumps
20between files in a family.)
21
22The program waits for you to type a command, then exercises the
23specified feature of Gist.  Some of the commands merely set attributes
24rather than producing any graphics output.  Some commands add a
25graphical element to the current drawing; others produce movies
26to get an idea of Gist performance during animation.  Most commands
27test the `D' and `H' level routines, but a few `A' and `P' level
28benchmarks allow you to see how much performance penalty is incurred
29by the higher level routines.  These low level tests also provide
30fair comparisons of Gist with other graphics packages.
31
32The 'help' command produces the following output, describing the
33various commands:
34
35	miggle[50] bench
36	Initializing 51x51 contour function, STANDBY...  DONE
37	bench> help
38
39	   This is the GIST benchmark/test program, commands are:
40
41	    Movies to test low level Gist functions--
42	0   - raw performance test GaMesh (direct)
43	1   - raw performance test GaMesh (animated)
44	2   - raw performance test GaFillMesh (direct)
45	3   - raw performance test GaFillMesh (animated)
46	clr - toggle interframe clear for tests 0-3
47	c   - clear screen
48	im  - raw performance test GpCells
49	clip  - toggle floating point clip
50	zoom  - toggle zoom for 0-3, im, pli
51
52	    Property toggles for high level tests--
53	bnd  - mesh boundary          odd0  - mesh region to 0
54	odd2  - mesh region to 2      reg0  - plot region to 0
55	reg1  - plot region to 1      reg2  - plot region to 2
56	nocopy - toggle noCopy mode for mesh-based tests
57	cmode - toggle dumping of colormap in hcp file
58	earth - use earthtones palette (default).  Others are:
59	     stern   rainbow   heat   gray   yarg
60	work  - use work stylesheet (default).  Others are:
61	     boxed   axes
62	wide      - toggle wide lines in all line drawings
63	linetype  - cycle through 5 line types in all line drawings
64	closed    - toggle closed lines in plg tests
65	rays      - toggle ray arrows in plg tests
66	smooth    - cycle through 3 hcp smoothnesses in plg tests
67	limits, xmin, xmax, ymin, ymax, nice=1/0, square=1/0,
68		restrict=1/0   - set limits (default limits,e,e,e,e)
69	logxy, 1/0, 1/0   - set/reset log scaling for x,y axes
70	animate  - toggle animation mode
71	marks    - toggle occasional curve markers for line drawings
72	legends  - toggle dumping of legends into hcp file
73
74	    Movies to test high level Gist functions--
75	plg  - test GdLines
76	plm  - test GdMesh
77	plf  - test GdFillMesh
78	plv  - test GdVectors
79	plc  - test GdContours
80
81	    Single frame tests of high level Gist functions--
82	plg1  - test GdLines
83	plm1  - test GdMesh
84	plf1  - test GdFillMesh
85	plc1  - test GdContours
86	pli   - test GdCells
87	plt   - test GdText
88	pls   - test GdLines in polymarker mode
89	pldj  - test GdDisjoint
90	txin  - test GdText     txout  - 2nd test of GdText
91	calib - text calibration frame
92	cfont - toggle font for calibration frame
93
94	    Tests of high level Gist control functions--
95	fma    - frame advance
96	hcp    - send current frame to hardcopy file
97	hcpon  - send every frame to hardcopy file
98	hcpoff - stop sending every frame to hardcopy file
99	redraw - redraw the X window
100
101	quit  - exit bench program (just q works too)
102
103	bench>
104
105
106Here are 3 sample sessions with the bench program.  Input lines that you
107type are marked with bench>.  Most of the features of Gist are
108demonstrated here.  The three sessions are:
109 (1) A performance test, both for "fastest possible" rendering using
110     A-level and P-level Gist routines, and for the D-level display
111     list routines that could reasonably be used by an interpreter.
112     Gist's "animation" mode is exhibited (smooth animation requires
113     a picture to be built up offscreen, then "blitted" onscreen).
114     The polyline and filled area primitives are exercised.
115 (2) Generate a relatively small CGM file which contains nearly
116     everything that Gist will ever throw at a CGM interpreter.
117     This file is useful for exercising the gist CGM browser, as well
118     as for seeing how badly Gist CGM file break your second favorite
119     CGM interpreter.
120 (3) Exercise other high level features of Gist, especially the
121     tick drawing and labeling routine.  Also exhibits D-level style
122     and palette files.
123
124For the record, "miggle" is a Sun-4/330 running the X11R4 sample server
125from MIT.  Gist was compiled by gcc with no optimization (optimization
126speeds up the low level benchmarks by about 30%).  The display is to
127an HP 730 workstation, which has a very fast X server.
128
129
130(1)---------------------------------------------------------------------
131
132
133IMPORTANT-- If you care about the timings in the first test, be sure
134to clear all other jobs off of the machine which is running your
135X server, AND DON'T MOVE THE MOUSE OR TYPE DURING A TEST!
136
137	miggle[51] bench
138	Initializing 51x51 contour function, STANDBY...  DONE
139	bench> 0
140	   Begin benchmark 0 -- GaMesh (direct).
141	elapsed seconds: 3.370000 user, 0.710000 system, 13.409998 wall
142	Plots per wall second= 3.728561
143
144	bench> 1
145	   Begin benchmark 1 -- GaMesh (animated).
146	elapsed seconds: 3.210000 user, 0.820000 system, 15.399998 wall
147	Plots per wall second= 3.246754
148
149	bench> 2
150	   Begin benchmark 2 -- GaFillMesh (direct).
151	elapsed seconds: 9.770000 user, 2.260000 system, 36.759997 wall
152	Plots per wall second= 1.360174
153
154	bench> 3
155	   Begin benchmark 3 -- GaFillMesh (animated).
156	elapsed seconds: 9.790000 user, 2.380000 system, 22.969997 wall
157	Plots per wall second= 2.176753
158
159	bench> clip
160	   Toggle floating point clip (now on)
161
162	bench> 0
163	   Begin benchmark 0 -- GaMesh (direct).
164	elapsed seconds: 4.870000 user, 0.780000 system, 15.829997 wall
165	Plots per wall second= 3.158560
166
167	bench> 1
168	   Begin benchmark 1 -- GaMesh (animated).
169	elapsed seconds: 5.010000 user, 0.630000 system, 15.849998 wall
170	Plots per wall second= 3.154575
171
172	bench> 2
173	   Begin benchmark 2 -- GaFillMesh (direct).
174	elapsed seconds: 13.390000 user, 2.410000 system, 40.499997 wall
175	Plots per wall second= 1.234568
176
177	bench> 3
178	   Begin benchmark 3 -- GaFillMesh (animated).
179	elapsed seconds: 13.570000 user, 2.330000 system, 28.999997 wall
180	Plots per wall second= 1.724138
181
182	bench> fma
183	   Frame advance
184
185	bench> plm
186	   Begin mesh benchmark.
187	elapsed seconds: 6.940000 user, 0.820000 system, 15.439997 wall
188	Plots per wall second= 3.238343
189
190	bench> animate
191	   Toggle animation mode (now on)
192
193	bench> plm
194	   Begin mesh benchmark.
195	elapsed seconds: 7.000000 user, 0.710000 system, 17.179998 wall
196	Plots per wall second= 2.910361
197
198	bench> animate
199	   Toggle animation mode (now off)
200
201	bench> plf
202	   Begin filled mesh benchmark.
203	elapsed seconds: 19.500000 user, 2.180000 system, 37.429997 wall
204	Plots per wall second= 1.335827
205
206	bench> animate
207	   Toggle animation mode (now on)
208
209	bench> plf
210	   Begin filled mesh benchmark.
211	elapsed seconds: 19.230000 user, 2.320000 system, 37.099997 wall
212	Plots per wall second= 1.347709
213
214	bench> quit
215	120.5u 18.8s 7:42 30% 0+568k 1+1io 1pf+0w
216
217Several features of these benchmark results are worth contemplating:
218Most important, for the X Engine (at least on my Sun-4/330), the time
219is dominated by the rendering time of the server, NOT by the CPU time
220required by Gist.  Secondly, of the CPU time used by Gist, the time to
221do the floating point clip explains much of the additional time used
222by the Gist D-level routines (there is no very practical way to avoid
223the clipping operation in the D-level routines).  Thirdly, animation
224mode costs little in performance.
225
226
227(2)---------------------------------------------------------------------
228
229Generate a CGM test file for exercising the gist browser:
230
231	miggle[52] bench
232	Initializing 51x51 contour function, STANDBY...  DONE
233	bench> plg1
234	   Plot small graph.
235
236	bench> marks
237	   Toggle markers (now on)
238
239	bench> plg1
240	   Plot small graph.
241
242	bench> marks
243	   Toggle markers (now off)
244
245	bench> rays
246	   Toggle rays (now on)
247
248	bench> plg1
249	   Plot small graph.
250
251	bench> rays
252	   Toggle rays (now off)
253
254	bench> wide
255	   Toggle wide lines (now on)
256
257	bench> plg1
258	   Plot small graph.
259
260	bench> linetype
261	   Toggle line type (now dashed)
262
263	bench> plg1
264	   Plot small graph.
265
266	bench> linetype
267	   Toggle line type (now dotted)
268
269	bench> plg1
270	   Plot small graph.
271
272	bench> linetype
273	   Toggle line type (now dash-dot)
274
275	bench> plg1
276	   Plot small graph.
277
278	bench> linetype
279	   Toggle line type (now dash-dot-dot)
280
281	bench> plg1
282	   Plot small graph.
283
284	bench> linetype
285	   Toggle line type (now solid)
286
287	bench> wide
288	   Toggle wide lines (now off)
289
290	bench> plg1
291	   Plot small graph.
292
293	bench> linetype
294	   Toggle line type (now dashed)
295
296	bench> plg1
297	   Plot small graph.
298
299	bench> linetype
300	   Toggle line type (now dotted)
301
302	bench> plg1
303	   Plot small graph.
304
305	bench> linetype
306	   Toggle line type (now dash-dot)
307
308	bench> plg1
309	   Plot small graph.
310
311	bench> linetype
312	   Toggle line type (now dash-dot-dot)
313
314	bench> plg1
315	   Plot small graph.
316
317	bench> linetype
318	   Toggle line type (now solid)
319
320	bench> txout
321	   Exterior text
322
323	bench> hcp
324	   Sent frame to hcp
325
326	bench> fma
327	   Frame advance
328
329	bench> plt
330	   Text test
331
332	bench> hcp
333	   Sent frame to hcp
334
335	bench> fma
336	   Frame advance
337
338	bench> pli
339	   Plot image.
340
341	bench> hcp
342	   Sent frame to hcp
343
344	bench> fma
345	   Frame advance
346
347	bench> plf1
348	   GdFillMesh test
349
350	bench> hcp
351	   Sent frame to hcp
352
353	bench> fma
354	   Frame advance
355
356	bench> cmode
357	   Toggle hcp color mode (now dump)
358
359	bench> plg1
360	   Plot small graph.
361
362	bench> pls
363	   Plot small scatter.
364
365	bench> pls
366	   Plot small scatter.
367
368	bench> pls
369	   Plot small scatter.
370
371	bench> pls
372	   Plot small scatter.
373
374	bench> pls
375	   Plot small scatter.
376
377	bench> pls
378	   Plot small scatter.
379
380	bench> pls
381	   Plot small scatter.
382
383	bench> plg1
384	   Plot small graph.
385
386	bench> txout
387	   Exterior text
388
389	bench> hcp
390	   Sent frame to hcp
391
392	bench> fma
393	   Frame advance
394
395	bench> pli
396	   Plot image.
397
398	bench> hcp
399	   Sent frame to hcp
400
401	bench> stern
402	OK
403
404	bench> fma
405	   Frame advance
406
407	bench> plf1
408	   GdFillMesh test
409
410	bench> hcp
411	   Sent frame to hcp
412
413	bench> quit
414	miggle[53] mv bench.cgm check.cgm
415
416
417
418Repeat this test with the command line "bench 1" to generate a PostScript
419file which you can send to your printer to be sure that Gist doesn't
420produce anything which confuses it.  Alternatively, you can build the
421gist previewer and run check.cgm through it to convert to PostScript:
422
423	miggle[54] gist/gist check.cgm -b -ps check.ps
424
425Or view the CGM file on your X server:
426
427	miggle[55] gist/gist check.cgm
428	check.cgm metafile description:
429	Fri Oct 30 13:53:07 1992;  For: munro
430	gist> f
431	gist> f
432	gist> f
433	gist> f
434	gist> f
435	gist> f
436	gist> draw 1
437	gist> quit
438
439You can also compare the relative sizes of PostScript and CGM output.
440On a more extensive test, I found that:
441
442  (1) A Gist PostScript file is roughly twice the size of the Gist CGM
443      file produced by the same commands (two hex characters represent
444      one byte).
445  (2) The CPU time required by Gist to produce a PostScript file is two
446      to three times the CPU time required by Gist to produce a CGM file
447      from the same commands.
448  (3) The compress utility will squeeze the PostScript file by about 60%,
449      to a size just slightly smaller than the CGM file.  The CGM file
450      compresses only 10-15% (not worth doing, but slightly smaller than
451      the compressed PostScript).
452
453The moral is- use Gist CGM output and don't bother to compress it.  The
454gist CGM browser will translate Gist CGM files into exactly the same
455PostScript file Gist would have produced in the first place.
456
457
458(3)---------------------------------------------------------------------
459
460The plg, plm, plc, plv, plf, plt, and pli commands to bench test
461features of the proposed interactive interface routines of the
462same names described in README.  The fma, redraw, limits, and
463logxy commands are also similar to the proposed interface, except
464that the limits command in bench takes the logarithms of the
465limits, while the interactive routine would work in the intuitive
466way.
467
468Whenever the screen looks interesting, type "hcp" to send it to the
469CGM file "bench.ps", which you can send to your printer.  (Note-
470this will fail silently for the frame displayed at the end of any
471of the movies, or for the "stale" frame displayed after fma.)
472
473
474	miggle[67] bench
475	Initializing 51x51 contour function, STANDBY...  DONE
476	bench> plm1
477	   GdMesh test
478
479	bench> txin
480	   Interior text
481
482	bench> txout
483	   Exterior text
484
485	bench> fma
486	   Frame advance
487
488	bench> plt
489	   Text test
490
491	bench> plm1
492	   GdMesh test
493
494	bench> redraw
495	   Redraw
496
497	bench> fma
498	   Frame advance
499
500	bench> plm1
501	   GdMesh test
502
503	bench> limits, .02, 1.48, .31, .59
504	   Setting limits
505
506	bench> limits, -.2, 1.2, e, e
507	   Setting limits
508
509	bench> limits, -.2, e, e, e, square=1
510	   Setting limits
511
512	bench> limits, -.2, 1.5, e, e
513	   Setting limits
514
515	bench> limits, square=0
516	   Setting limits
517
518	bench> logxy, 1, 1
519	   Setting logxy
520
521	bench> limits, 105, 190, -.001, 1
522	   Setting limits
523
524	bench> limits, 17, 39.5, .001, .1
525	   Setting limits
526
527	bench> limits, 17, 32, 1, 100
528	   Setting limits
529
530	bench> limits, 16, 19, 1.e4, 1.e6
531	   Setting limits
532
533	bench> logxy, 0, 0
534	   Setting logxy
535
536	bench> limits, e, e, e, e
537	   Setting limits
538
539	bench> plg
540	   Lissajous test
541	elapsed seconds: 2.410000 user, 0.180000 system, 2.839997 wall
542	Plots per wall second= 17.605653
543
544	bench> animate
545	   Toggle animation mode (now on)
546
547	bench> plg
548	   Lissajous test
549	elapsed seconds: 2.320000 user, 0.150000 system, 4.079997 wall
550	Plots per wall second= 12.254911
551
552	bench> marks
553	   Toggle markers (now on)
554
555	bench> plg
556	   Lissajous test
557	elapsed seconds: 3.170000 user, 0.280000 system, 4.389997 wall
558	Plots per wall second= 11.389529
559
560	bench> wide
561	   Toggle wide lines (now on)
562
563	bench> limits, square=1
564	   Setting limits
565
566	bench> marks
567	   Toggle markers (now off)
568
569	bench> plg
570	   Lissajous test
571	elapsed seconds: 2.260000 user, 0.160000 system, 5.779997 wall
572	Plots per wall second= 8.650523
573
574	bench> wide
575	   Toggle wide lines (now off)
576
577	bench> rays
578	   Toggle rays (now on)
579
580	bench> plg
581	   Lissajous test
582	elapsed seconds: 3.090000 user, 0.270000 system, 3.409997 wall
583	Plots per wall second= 14.662770
584
585	bench> rays
586	   Toggle rays (now off)
587
588	bench> limits, square=0
589	   Setting limits
590
591	bench> plm
592	   Begin mesh benchmark.
593	elapsed seconds: 6.930000 user, 0.830000 system, 16.279997 wall
594	Plots per wall second= 3.071254
595
596	bench> marks
597	   Toggle markers (now on)
598
599	bench> plc
600	   Begin contour benchmark.
601	elapsed seconds: 15.810000 user, 0.310000 system, 16.179997 wall
602	Plots per wall second= 3.090235
603
604	bench> limits, .25, .75, .25, .75
605	   Setting limits
606
607	bench> plv
608	   Begin vector benchmark.
609	elapsed seconds: 12.650000 user, 0.860000 system, 14.929997 wall
610	Plots per wall second= 3.348963
611
612	bench> animate
613	   Toggle animation mode (now off)
614
615	bench> limits, e, e, e, e
616	   Setting limits
617
618	bench> pli
619	   Plot image.
620
621	bench> rainbow
622	OK
623
624	bench> redraw
625	   Redraw
626
627	bench> cmode
628	   Toggle hcp color mode (now dump)
629
630	bench> stern
631	OK
632
633	bench> redraw
634	   Redraw
635
636	bench> heat
637	OK
638
639	bench> gray
640	OK
641
642	bench> yarg
643	OK
644
645	bench> earth
646	OK
647
648	bench> fma
649	   Frame advance
650
651	bench> plg1
652	   Plot small graph.
653
654	bench> pls
655	   Plot small scatter.
656
657	bench> pls
658	   Plot small scatter.
659
660	bench> pls
661	   Plot small scatter.
662
663	bench> pls
664	   Plot small scatter.
665
666	bench> pls
667	   Plot small scatter.
668
669	bench> pls
670	   Plot small scatter.
671
672	bench> pls
673	   Plot small scatter.
674
675	bench> plg1
676	   Plot small graph.
677
678	bench> boxed
679	OK
680
681	bench> plg1
682	   Plot small graph.
683
684	bench> axes
685	OK
686
687	bench> plg1
688	   Plot small graph.
689
690	bench> work
691	OK
692
693	bench> plg1
694	   Plot small graph.
695
696	bench> quit
697	55.9u 4.1s 9:32 10% 0+736k 6+1io 6pf+0w
698
699Note that in non-dump cmode, a redraw is required after a palette change
700to change the pixel numbers of the image.
701