News
QuikScat
NSCAT
YSCAT
SAR Research
SCP
CERS
Jason-1
Publications
Software
Studies
Lab Resources
Group Members
Related Links
Contact Us
Getting to BYU

Longlib

   

The LONGLIB library is a set of subroutines originally written in DEC VAX/VMS FORTRAN that has been updated to support other fortran dialects including gfortran. The code has been translated into archaic but workable C. The package is designed to create line graphics, but has some support for pixel images. The package supports three classes of graphics devices: (1) terminals that support graphics such as Xterm and Tektronics, (2) printers and hardcopy devices via an intermediate meta files, and (3) pixel-based displays such as an X window or a standalone monitor (RamTek).

A general set of graphics commands provides information simultaneously to one or more of these output classes. The line graphics commands are based on moving a virtual pen on the surface, e.g., a "pen up" move to a position on a virtual sheet of paper, then a "pen down" move to a series of other positions that draws a line, followed by a "pen up" or "new pen" to change the color/width/line-type of the pen. The positions are specified in user units which are converted to scalled output positions for the particular output class. For terminals, escaped text strings are sent to switch the display to graphics mode and then draw lines, followed by a switch back to terminal text mode. For printers, the commands recorded in a "meta" file which is later processed by a meta converter to generate an output file for the particular hardcopy device desired, e.g., postcript. A "replot" program plots the contents of the meta file to a terminal or pixel-based display. For pixel-based displays, the pen movements are either sent directly to the display drawing code (e.g., the X windows interface) or converted to pixel address in an array that are set to the specified color. The array can output to a file or display on a display (e.g., X-windows or an archaic display monitor originally termed a "Ramtek" display in the code).

High level routines that provide pen movement comments are provided that draw character and number strings, as well as provide finished plots with axes in 2 or 3 dimensions.

The archaic nature of the code and its operation are acknowledged, but it has a number of unique advantages. It self-contained and requires no other libraries, other than optionally linking to X windows. It includes routines that can draw directly into pixel arrays. This include characters. The code is free and pieces from the library can be adapted for other uses.

The current version of LongLib, known as LongLib22, supports X windows, textronics-compatiable graphics devices (including XTERM), postscript, etc. The package has been used on VMS, linux, and various unix platforms including AIX, SGI, HPUX, and sun.

The C language X interface has been upgraded to handle 24 and 32 bit displays.

Download LongLib22 zip file (3.1 Mb)

github https://github.com/longBYU/longlib22

Online LongLib93 Documentation (out of date)

LongLib22 and its earlier version LongLib93 in the public domain.