NOTES ON PROGRAMS IN tools
____________________________________
______________________________________________________________
Attractors on a torus, as described in the article "Attractors on an N-Torus: Quasiperiodicity Versus Chaos," by Grebogi, Ott and Yorke, Physica D, Vol. 15, pp. 354-373 (1985).
The surface of the torus has been unfolded and flattened onto the plane of the screen, so it is shown as a square. Points in the square are referred to by the pair (theta,psi), where theta is the horizontal axis and psi is vertical. An attractor is drawn by taking an arbitrary point and repeatedly putting it through a non-linear mapping, plotting each new value. The program may not make a whole lot of sense without having read some of the article. Page 359 describes the particular equations used to make the images in the article.
This program is a much modified version of "smoke" (was in imgtools), which in turn is based on the article "A Note on Rendering 3-D Strange Attractors" from Computers and Graphics, Vol 12, No 2. pp. 263-267, 1988.
______________________________________________________________
______________________________________________________________
The frame buffer of the IRIS contains values which are translated into RGB values by a color map for applications in color map mode. cedit changes the mapping of any color index. Three sliders are displayed, along with a sample patch of the color being edited. Normal operation is to establish input focus by placing the cursor within the cedit window then press and hold the Alt key down. While continuing to hold the Alt key down move the cursor outside of the cedit window and click the left button to pick up a color index to be edited. The sliders indicate the red, green, and blue components of the current color. Once the color map index has been picked, release the Alt key and return to the cedit win- dow. The color can then be changed by clicking down on a slider in cedit, and adjusting the position of the control. Under each slider con- trol is a number representing the current value of that color component. The number ranges from 0 (for least intensity) to 255 (for most intensi- ty). Under the color patch is a number that represents the current color index. The user can toggle between decimal and hexidecimal representa- tions of the current RGB values being displayed via the menu item "toggle numbers".
NOTES
cedit only knows about the frontbuffer. If the queried pixel belongs to a double buffered window, it is possible for cedit to grab from the wrong buffer. When the window swaps buffers, cedit will be able to grab the correct color.
Some applications use dithered colors so the index and color of adjacent pixels will be different for some regions of the screen.
______________________________________________________________
clock is a window manager graphics program which shows the current (machine) time. The current machine time is set after you boot up the system, when you go into multi-user mode. If the argument "dot" is used when invoking the clock (typing "clock dot"), a small, decorative dot covers the middle of the clock face.
Selecting the Calendar menu button invokes the ical program.
Selecting the Alarm menu button causes the alarm hour hand to be displayed in red, and the alarm time to be displayed at the bottom of the clock. The left mouse button sets the alarm time, based on the angular position of the cursor with respect to the center of the clock. At the alarm time, the keyboard bell will sound and the clock face will turn red. The keyboard bell will sound once each minute until the alarm is reset, either by turning off alarm mode from the Alarm menu button, or by resetting the alarm time.
______________________________________________________________
Using LEFTMOUSE, one can alternate between four different standard colorbars patterns. This implementation is based on Illumination and Color in Computer Generated Imagery by Roy Hall.
______________________________________________________________
cycol creates a display window of a series of colors from the colormap. The default series runs from 128 to 255. This can be altered either by 1). specifying the start and end indexes you wish to display via the command line, or 2). after cycol has already started, a new pallete may be selected by pointing with and clicking the LEFTMOUSE button on the starting and ending indexes you wish to view.
Once you have selected the current pallete, you can press down the LEFTMOUSE button while inside the window, and, moving it to the left or the right, will make the pallete of colors shift accordingly.
NOTE
______________________________________________________________
dynadraw uses a simple dynamics model to create caligraphic strokes. The images created can be saved either directly into a PostScript file for easy printing, or out to an image file via the RIGHTMOUSE popup menu. Use LEFTMOUSE for drawing strokes. As long as you hold down the mouse button, the program will continue to draw the current stroke in a dynamic way. Pressing the MIDDLEMOUSE will clear the page before you begin your next image. The UPARROW keyboard key will make strokes wider, while the DOWNARROW key will make the painted strokes more narrow.
This program models the paint brush as a mass that moves across the canvas with some amount of friction or drag. The brush is connected to the cursor by a rubber band. The amount of mass and the amount of drag can be changed using the sliders at the bottom of the window. These can be changed with the LEFTMOUSE. Mass is initially set to 0.5. Moving Mass closer to 0.0 will make the brush follow the cursor more quickly while moving it towards 1.0 will make it lag farther behind the cursor. The Drag is initially set at 0.15. Increasing the drag towards 1.0 will make the brush motion damp quickly, while decreasing the drag can make the brush have no friction at all as it travels.
See also the dynadraw section in Paul's grafica obscura.
______________________________________________________________
See if the gamma correction value is correct by comparing the intensity of full on, full off horizontal lines to a region of 50 percent grey.
gamcal checks to see if the gamma correction value is correct by comparing the intensity of full on/full off horizontal lines to a region of half-intensity grey. Normally the gamma of the display should be set to 2.4 using the program /usr/sbin/gamma. When the gamma of the display is set correctly, there should be little or no change in brightness in each column of rectangles in the window. In the column on the far left, the horizontal lines alternate full intensity and black. The average brightness of the top region should be 50% white. The solid areas in the left column are filled with a constant 50% grey. If the display is properly calibrated, the solid and the striped regions should have the same apparent brightness.
For more information about gamma calibration see the note on Display Gamma section in Paul's grafica obscura "Viewing Notes".
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
mag performs pixel replication and magnification in a window by copying and enlarging the selected area of the screen. The mag program demonstrates pixel reading and writing on the IRIS. The area of the screen copied is chosen by the user with the mouse. The power of magnification is an integer value which must be entered into the command line. If no integer is specified, the default value of the power of magnification is 2.
Operator control of this demo is strictly with the mouse.
Mouse buttons Function left pick area on screen under cursor right mag pop-up menuIt is important to note that the program needs to maintain input focus when selecting a region under the cursor. This can be achieved by positioning the cursor in the mag window and then depressing either the Shift or Ctrl key. While continuing to hold the key, move the cursor to the desired location on the screen and click the Left mouse button.
Values of magnification greater than 2 significantly degrade the magnified image.
Trying to magnify the mag window causes some inexplicable results.
Sometimes, when the window manager is in double buffer mode, the area magnified appears in the wrong color. The mag program works best in single buffer mode.
______________________________________________________________
By default, makemap will initialize all colors from 0-255 except for color cells 16-31.
Options:
-full In addition to the default behavior, write a color cube into 256-512, and a gray ramp into 513-639. -ignore16to31 Don't bother trying to fixup cells 16-31; Just leave these cells alone.
A colormap is a mapping from color-index values (integers) into RGB values. All GL programs (graphics programs linked with libgl) share a common X colormap, which is distinct from the default X root colormap.
Essentially, makemap causes a certain set of colors to be assigned to the GL colormap (which is just another X colormap as far as the X server is concerned).
Although there may be multiple X colormaps defined in the system at any one time, only one of these X colormaps is installed (loaded into the single hardware colormap) at any given time. The GL colormap will be installed whenever GL programs have input focus.
The GL colormap is relevant only for GL programs running in cmode (color-index mode).
By default, makemap will initialize the first 256 entries in the GL colormap with the exception of color cells 16 thru 31. The reason for not initializing 16-31 is so that X clients can use those cells without interfering with GL programs. The lowest eight colors of the GL colormap are mapped to the eight standard colors of the Graphics Library (black, red, green, yellow, blue, magenta, cyan and white). The next 8 colors (8-15) are mapped to some pastel shades as used by the IRIS Workspace and other system tools. These colors can be dithered with the first eight to get a very wide range even on a minimal system when in double buffered mode. The next 16 colors (16-31) are left untouched. The next 24 colors (32 to 55) are mapped as a black to almost-white gray ramp. The remaining 200 colors (56 to 255) are mapped as a 5*8*5 color cube, which starts at black and ends with white. In this color cube, the 8 levels of green change the fastest, then 5 levels of red, and finally the 5 levels of blue change slowest.
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
WARNING! once it kicks in, for the duration of this program it might appear "we have taken over your television set..." Do not be alarmed--to EXIT, press ESCKEY or LEFTMOUSE or MIDDLEMOUSE or RIGHTMOUSE
______________________________________________________________
On 4D machines with more than 10 bitplanes, the -s option allows the user to initially startup showmap with a 32x32 array grid rather than the default 64x64 size.
______________________________________________________________
Using the functionality available in libtri.a, tritest provides an example of a way to decompose complex polygons into a series of triangles.
Enter points with the LEFTMOUSE button. Close a loop by giving a point that is close to the starting point. You can make any number of independent loops. Press MIDDLEMOUSE to convert the complex polygon into triangles. If any one of the polygonal rings intersect another, the algorithm will fail. If this is the case, when you go to press MIDDLEMOUSE, the window will simply be cleared back to black.
This program outputs triangle meshes for now. You can make it put out independent triangles by using the code in unmesh.c in libgutil. Please let me -- Paul Haeberli, paul@sgi.com, 415/390-3665 -- know if you need help with that.
______________________________________________________________
______________________________________________________________
______________________________________________________________
Graphics Utility Tools
For The IRIS
Paul Haeberli - 1991
______________________________________________________________