This program creates a tile of a specified size by processing an XBM image file. The tile grid is "laid over" the image to form squares. The non-white pixels in each square of the image are counted. If the percentage of non-white pixels exceeds a specified threshold, the corresponding bit in the tile is set. The supported options are: -h i tile height, default 32 -w i tile width, default 32 -t r threshold, default 0.50
[ Full documentation | Source code ]
Usage: binpack [window options] Binpack illustrates several approximation algorithms for solving the one-dimensional bin packing problem. For references, see the "info" screen.
[ Full documentation | Source code ]
bitdemo illustrates some of the techniques made available by the bitplane package in the program library. The upper rectangle is drawn using three bitplanes, reserving one plane for each of the primary colors. After clicking one of the "draw" or "erase" buttons, you can draw or erase any one of the bitplanes independently of the others. Notice what happens when the colors overlap. Drawing is not constrained to the rectangle so that you can see some of the possible consequences of using the bitplane routines improperly. The lower rectangle is drawn using four other bitplanes, one each for the four types of objects. Click once on a button to bring the objects of that type to the front. Click a second time to make them invisible.
[ Full documentation | Source code ]
The following options are supported: -s i size of cells; default 5 -c s color for filling cells; default black Also handles row files.
[ Full documentation | Source code ]
[ Full documentation | Source code ]
A bitmap editor. This is really the PixMap editor pme.icn with colors set to black and white, and color changes disabled. Left and right mouse buttons draw black and white. Press q or ESC to quit; press s to save. Capital "S" prompts for and saves under a new filename.
[ Full documentation | Source code ]
Usage: bpack [window options] Bpack illustrates several approximation algorithms for solving the one-dimensional bin packing problem. For a discussion of this program, see http://www.cs.arizona.edu/icon/oddsends/bpack/bpack.htm For references, see the "about" screen.
[ Full documentation | Source code ]
Breakout game Infinite balls, Left or Right click to start or restart after losing ball 9 levels - can select any level when not active using 1-9 1 hit, 2 hit, 3 hit, and invincible blocks can be used for levels
[ Full documentation | Source code ]
Requires: Version 9 graphics
[ Full documentation | Source code ]
This program displays the time-sequence development on one-dimensional cellular automata in which the state of a cell depends only on the two cells adjacent to it -- 2,1 automata. See "Theory and Applications of Cellular Automata", Stephan Wolfram, World Scientific, 1986 for an explanation for the method and rule encoding. The options supported are: -r i rule i, default 110 -w i width (number of cells), default 200 -h i height (number of time steps), default width -s seed first row at random with <= width / 2 cells -R randomize the run -e s initialize first row with seeds at positions generated by Icon expression e. -i s save final image in file named s; default no image -H use hidden window; if no image file specified, ca21.gif is used The -e option is powerful but somewhat strange. For example, to seed every other cell in the first row, use -e 'seq(1,2') which generates 1, 3, 5, 7, ... and seeds those cells (cells are numbered starting at 1).
[ Full documentation | Source code ]
The nonlinearity of a color display is often characterized by a "gamma correction" value; calib provides a crude method for determining this value for a particular monitor. It displays two rectangles: one formed of alternating black and white scanlines and one formed of a single, solid color. Move the slider until they match; the number displayed above the slider is the gamma-correction factor.
[ Full documentation | Source code ]
This application allows the user to change selected color in an image. The colors are displayed in a palette on the application window. Clicking on one brings up a color dialog in which the color can be adjusted. The keyboard shortcuts are: @O open image File menu @Q quit the application File menu @R revert to original colors Colors menu @S save image File menu Note: "cameleon" is a variant spelling of "chameleon".
[ Full documentation | Source code ]
This program displays a Chernoff face.
[ Full documentation | Source code ]
This program builds a palette database from color lists.
[ Full documentation | Source code ]
coloralc tests how many fixed and/or mutable colors can be allocated. The two sets of pushbuttons allocate 1, 8, or 32 randomly chosen colors of the selected type. New colors are arrayed on the display using squares for fixed colors and discs for mutable colors. When no more colors can be created, no more squares or discs will appear. Clicking on a color with the left mouse button selects it as the current color; the current color can be drawn on the screen by moving the mouse with the left button down. Clicking on a mutable color (a disc) with the right mouse mutton changes it to a new random color. There is also a pushbutton that changes all mutable colors simultaneously.
[ Full documentation | Source code ]
This program shows the colors given color list files given on the command line. colormap will display color lists with more than 256 entries but, of course, it cannot display more than 256 different colors (if that many).
[ Full documentation | Source code ]
Input is expected to be the output of unravel -r.
[ Full documentation | Source code ]
Input is expected to be the output of unravel -r.
[ Full documentation | Source code ]
colrbook is a mouse-driven program for choosing named colors. Along the left are 24 equally spaced hues plus black, gray, white, brown, violet, and pink. Click on any of these to see the twenty colors that are possible by adding lightness and saturation modifiers to the particular hue.
[ Full documentation | Source code ]
An X color name browser. Click on a colorname to change the window's background color. Not very interesting on a monochrome server.
[ Full documentation | Source code ]
colrpick provides a command-level interface to the ColorDialog procedure. The ColorValue() of the selected color is written to standard output when the Okay button is pressed. If the Cancel button is pressed, colorpick exits with an error by calling stop(). A default color can be specified by one or more command arguments, for example "colrpick deep green".
[ Full documentation | Source code ]
usage: concen [winoptions] [ncards] Concentration, as presented here, is a simple solitaire game. When the program starts, there are 52 playing cards, face down. They may be turned over by clicking on them with the mouse. Only two cards may be face up at a time; if they are the same rank (e.g. two sevens), they are removed. The object is to clear the table. (For an interesting discussion of two-person Concentration, see Ian Stewart's "Mathematical Recreations" column in the October, 1991, edition of Scientific American, entitled "Concentration: A Winning Strategy".)
[ Full documentation | Source code ]
This program creates square quilting patterns as described in "Symmetry in Chaos", Michael Field and Martin Golubitsky, Oxford University Press, 1992. Instead of plotting an image, the values are computed and saved in "numerical carpets" for off-line plotting. The following options are supported: -i i Save carpet files every i iterations; default 100000 -p s Prefix for carpet file names, default q_ -t i Terminate execution after i iterations; default no limit Warning: This program takes a long time to go through enough iterations to produce nice results. Note: This is an unfinished work, supplied for interest only. There are several sections of parameter values below. All but one is commented out. Change this to get other patterns.
[ Full documentation | Source code ]
See colorway.icn for documentation
[ Full documentation | Source code ]
This program reads a drawdown in terms of rows of zeros and ones from standard input and outputs draft information in textual form. It also accepts BLPs as input.
[ Full documentation | Source code ]
This program reads a pattern in row or BLP format. The number of shafts and treadles required is written to standard output.
[ Full documentation | Source code ]
The following command line option is supported: -p assume partial repeats may occur at edges of pattern; default complete repeats
[ Full documentation | Source code ]
This program reads BLPs that represent drawdowns. The names of BLP files are given on the command line. WIF files are output. The following option is supported: -w make Web page; default don't If Web pages are being produced, the extension "html" is used; otherwise "wif".
[ Full documentation | Source code ]
This program reads a drawdown from standard input in the form of rows of zeros and ones, in which ones indicate places where the warp thread is on top and zeros where the weft thread is on top. It also accepts a BLP as input. At present, the minimum size is 16, built in. This should be changed to a value that could be specified as an option. It outputs a BLP.
[ Full documentation | Source code ]
This is just an example of an interesting graphic design. It can easily be modified to produce other designs.
[ Full documentation | Source code ]
This program draws a design in which i points around a circle are all connected to each other. The number of points is given as a command-line argument (default 20). Values larger than 30 produce results that are too dense to be interesting.
[ Full documentation | Source code ]
This program draws a design in which i points around a square are all connected to each other. The number of points along a side (default 10) and the distance between them (default 40) are given as command-line arguments.
[ Full documentation | Source code ]
Dlgvu displays and prints USGS digital map data. usage: dlgvu [options] file... Each file argument is one of: a directory containing DLG files in SDTS format a ZIP format archive of such files (requires "unzip" utility) a text file containing coordinates of paths and features All interaction is via mouse actions and keyboard shortcuts. The display window may be resized as desired.
[ Full documentation | Source code ]
This program produces an ISD from a bi-level image string or row file. The following option is supported: -n s draft name, default "drawup" -r interpret input as row pattern; default image string
[ Full documentation | Source code ]
usage: drip [-n ncolors] [-c correlation] [-d delay] [window options] drip uses color map animation to simulate the spread of colored liquid dripping into the center of a pool. ncolors is the number of different colors present at one time. correlation (0.0 to 1.0) controls the similarity of two consecutive colors. It probably doesn't meet a statistician's strict definition of the term. delay is the delay between drops, in milliseconds. This may not be needed; speed seems to vary greatly among different X servers, even on the same machine.
[ Full documentation | Source code ]
A drawing program. Invoked with one optional argument, the name of a remote host on which to share the drawing surface. Dragging the left button draws black dots The middle button draws a line from button press to the release point The right button draws white dots Control-L clears the screen The Escape character exits the program
[ Full documentation | Source code ]
Facebender is a caricature generator. Read in an image and use the left mouse button to pick the key points as prompted. Click the right button to skip a feature. Pull down "drawing" on the display menu to see the caricature. Move the slider to change the distortion.
[ Full documentation | Source code ]
Fetti is an interactive program for generating decorative web-page sidebars composed of randomly colored squares. Many different parameters can be varied on the control panel. Note that the mouse must be over a numeric field to type in a new value.
[ Full documentation | Source code ]
A text file browser that employs a fish-eye view. The fish-eye view displays text in a larger font in the middle (focus) gradually declining to tiny fonts at the top and bottom of the screen. "q" or ESC to quit. "n" slides the focus down one line "p" slides the focus up one line. "w" widens the focus by one. "W" narrows the focus by one. Mouse clicks move the focus to the line on which the mouse is located; clicking in the left margin moves in the file proportional to the mouse's y coordinate in the window.
[ Full documentation | Source code ]
This program creates an image file for a text file. The results are unpredictable for binary files or files with control characters. The image may be too large for a window. Badly needed are options for the font.
[ Full documentation | Source code ]
This program produces the smallest motif in an image that will tile to the image. The image to be processed must be a "true" repeat -- pixel for pixel. The options supported are: -n s suffix for output image, default _t. The suffix is appended to the basename of the input image, as in foo.gif -> foo_t.gif. -s show size; default produce image Warning: This program is *very* slow.
[ Full documentation | Source code ]
This program is designed to assist in locating areas within an image that, when tiled, produce a desired effect. For example, a background may consist of a tiled image; this program can be used to find the smallest tile for the repeat (by "eye-balling"). It's worth noting that interesting images can be found for other settings. For example, another interesting use of this program is to produce striped patterns by selecting a row or column of an image to get a tile that is one character wide. Sometimes a few rows or columns give an interesting "fabric" effect. There are three windows: the VIB control window the source image window a repeat window, which shows the selection from the source image, tiled. The selection from the source image is shown as a marquee in the source image window. When a source image is loaded, the marquee starts with the entire image. The marquee can be changed by buttons and arrow-key events on the control window (not the source image window). The arrow keys have two modes. With no modifier, they nudge the location of the marquee. With the meta-key modifier, they nudge the dimensions of the marquee. The reset button resets the marquee to the entire image. The current selection can be mirrored using the mirror button. The following features are provided through keyboard shortcuts: the File menu, and in some cases, on-board buttons: @O open new source image @Q quit application @S save current selection as an image @Z set size precisely The repeat window can be resized by the user, but it is not redrawn until the marque is changed or the refresh button is pushed.
[ Full documentation | Source code ]
Comments: This program display a fractal snowflake of specified order. Options exist to do colors, etc. See the procedure 'helpmsg' for command line options An order 4 snowflake is particularly nice. Waits for a window event before closing window
[ Full documentation | Source code ]
This program analyzes the floats in a drawdown as a BLP or row file from standard input.
[ Full documentation | Source code ]
This program analyzes the floats in BLPs for drawdowns. The names of BLPs are given on the command line. The output images are named <basename>_float.gif
[ Full documentation | Source code ]
This program builds a palette database from Fracting color maps.
[ Full documentation | Source code ]
Usage: fontpick [fontname] fontpick is an interactive tool for displaying fonts. Initially, the specified font, or the VIB default font, is displayed. To display a different font, type its name and press return. To exit, enter Meta-Q or click the QUIT button. Caveats: -- any character that is too large is clipped to fit its cell -- the window cannot be resized to handle large fonts
[ Full documentation | Source code ]
This program converts Fractint .map files to lists of Icon colors.
[ Full documentation | Source code ]
Comments: This program shows how fractal lines work. See the procedure 'helpmsg' for command line options Waits for a window event before closing window
[ Full documentation | Source code ]
This program draws fractal "stars". For a discussion of fractal stars, see Fractals; Endlessly Repeated Geometrical Figures, Hans Lauwerier, Princeton University Press, 1991, pp. 72-77. and Geometric and Artistic Graphics; Design Generation with Microcomputers, Jean-Paul Delahaye, Macmillan, 1987, pp. 55-63. The window is square. The window size can be given on the command line, default 600. The present user interface is crude. To see all the fractal stars that are provided by default, type all from standard input. After each star is drawn, the program waits for an event before going on to the next star. Alternatively, a single star can be drawn by typing its name preceded by an equals sign. The names are fstar01 through fstar13. For example, =fstar09 draws the ninth star. In future extensions, provision will be made for user-defined stars.
[ Full documentation | Source code ]
Usage: gallery [-{whs}nnn] [-{rmtud}] file... Gallery displays multiple images in a single window. The images are shrunken by resampling and tiled in columns or rows. GIF and XPM format images are always supported. JPEG format is supported when built by Jcon. JPEG, PPM, TIFF, PNG, and RLE formats are also available under Unix if the necessary conversion utilities are available in the shell search path. When the window fills, diagonal lines in the extreme corners of the window indicate that you can press Enter for the next screenful. Solid triangles appear when there are no more images; press Q to exit. At either of those pauses, pressing 'S' brings up a dialog for saving a snapshot of the window. Clicking the left mouse button on an image displays a popup window with information about the image. A second click dismisses the popup, as does the space bar or Enter key. The right mouse button activates the same popup momentarily until the button is released. -wnnn sets the minimum thumbnail width. The default is 32. -hnnn sets the minimum thumbnail height. The default is 32. -snnn sets the minimum height and width together. -r arranges images in rows instead of columns. -m maximizes the window size before displaying images. -t trims file names of leading path components and extensions. -u shows images completely unlabeled. -d prints some debugging information. The standard Window() options are accepted and can be used to set the window size and other parameters. A default gamma value of 1.0 can be changed by using (e.g.) "-A gamma=1.6". -cn and -gn options, which formerly selected a color palette, are now ignored.
[ Full documentation | Source code ]
This program allows changing the gamma correction for images. It can be used, for example, to desaturate images for use as backgrounds. Note: Fully saturated nd fully unsaturated colors are not affected by gamma correction.
[ Full documentation | Source code ]
AD HOC. Assumes any non-black pixel is white.
[ Full documentation | Source code ]
This program takes a B&W GIF image whose name is given on the command line and writes an ISD for a draft to standard output. If the GIF is not strictly B&W, non-black pixels are assumed to be white.
[ Full documentation | Source code ]
AD HOC. Assumes any non-black pixel is white.
[ Full documentation | Source code ]
This program takes the name of a GIF file for a black & white image and outputs a WIF for a corresponding draft. If the GIF is not strictly black & white, all non-black pixels are interpreted as white.
[ Full documentation | Source code ]
This program makes a custom palette database from the colors in GIF images
[ Full documentation | Source code ]
This program converts GIF images whose names are given on the command line to image strings as used by DrawImage(). The image strings are written to files with the basenames of the GIF files and the suffix "ims" or "iml" depending on the output option. The following options are supported: -l write Icon literal instead of plain string; suffix is .iml (default .ims). -i i make lines of literals at most i characters long -p s palette to use; default c1. For -l, the length refers to the number of characters represented. If they require escapes, thea actual line length will be longer. This is to prevent errors from trying to continue a string literal in the middle of an escape sequence. In addition, three blanks are prepended to each line and the characters # and $ are escaped to prevent then from being misinterpreted by Icon's translator. .iml files are suitable for inclusion in program text, either directly or by $include. .ims files are suitable for reading.
[ Full documentation | Source code ]
This program convert GIF images, whose names are given on the command line to bi-level patterns. The GIFs are expected to be black and white. All non-white pixels are treated as black
[ Full documentation | Source code ]
This program exercises a wide variety of graphics operations. Several independent output tests are run in square cells within a window. The resulting image can be compared with a standard image to determine its correctness. The "Dialog" button brings up an interactive dialog box test; the "Quit" button exits the program. Some variations among systems are expected in the areas of fonts, attribute values, and availability of mutable colors. The first test, involving window resizing, produces results that do not exactly fit the grid pattern of the other tests; that is also expected. This program is designed for a color display, but it also works on monochrome systems.
[ Full documentation | Source code ]
This application provides a variety of facilities for creating and editing binary arrays. It is intended for use with weaving tie-ups and liftplans.
[ Full documentation | Source code ]
Usage: gxplor [-s] [window options] gxplor is an interactive explorer for experimenting with Icon's graphics facilities. Commands read from standard input set window attributes or invoke procedures. Result values are reported on standard output. Errors are caught when possible. Here's an example, with commentary at the side, that illustrates some of the possibilities: % gxplor start program; a window appears > fg query value of "fg" attribute black > fg blue set "fg" attribute blue > linewidth 7 set "linewidth" attribute 7 > drawline 12 20 55 73 a fat blue line appears > erasearea clear window > fillarea [unrecognized] oops -- wrong name > fillrectangle > pattern query "pattern" attribute [failed] > pattern grid set it grid > fillstyle solid > fillstyle opaque error 205: invalid value > fillstyle textured set fillstyle textured > clip 50 50 400 200 set clipping > fillrectangle fill clipped area with pattern > zoom 40 40 100 100 300 50 200 200 zoom a region > &storage query memory usage 0 274 12184 > exit exit the program % Input consists of blank-separated words, as shown. If the first word is recognized as the name of an attribute, a WAttrib() call is made. If it is an Icon keyword, the keyword value is printed. Otherwise, the word is treated as a procedure name. Any built-in function or linked procedure can be invoked, and procedure names are treated as case-insensitive for ease of entry. If a line begins with an integer, the remainder of the line is interpreted as a command to be repeated that number of times. Afterwards, the elapsed CPU and wall-clock time is reported; these figures include loop and call overhead. The -s option selects "script" mode: input is echoed on standard output, and at EOF the program pauses in WDone().
[ Full documentation | Source code ]
Hearts & Bones Usage: hb [-h <board height>] [-w <board width>] [-b <# bones>] [-B] -B says to print the actual number of bones placed. For best results, use odd board heights and widths, and even square heights and widths. Defaults: board height = 9, board width = 13, # bones = 25. --- Game Play --- Hit "q" to quit, "r" to start a new game. The object is to visit all the safe squares without stepping on a bone. You *visit* a square by clicking the left mouse button in it. If the square is safe, a number is posted in it that reveals the number of squares in the eight neighboring squares the contain bones. Squares containing hearts (represented by $) are always safe. You can only visit squares that are adjacent to squares already visited. At the start of a game, the upper left square (a heart square) is pre-visited for you. If a visited square has no neighbors, its adjacent squares are automatically visited for you, as a convenience. At any time you can *mark* a square that you believe has a bone by clicking the right (or center) mouse button on it. This is a memory aid only -- if you visit it later (and you were right), you're dead. There is no confirmation whether a square you have marked really contains a bone, although you will probably find out later when it causes you to make a mistake. A right-button click on a marked square unmarks it. The game ends when you have visited all safe squares or stepped on a bone. (Presently, there is no automatic detection of a winning board -- you just have to notice that for yourself). NOTE: If you use the command line options to alter the setup parameters (e.g. increasing the number of squares, or *decreasing* the number of bones), you might get a stack overflow due, I think, to deep recursion. I have found that setting the environment variable MSTKSIZE=30000 works well.
[ Full documentation | Source code ]
This program displays a simple histogram based on numbers provided in standard input. The following options are supported: -s r horizontal scale factors, default 1.0 -w i bar width in pixels, default 5 -g i gap between bars, default 1 -m minimal; set width to 1, gap to 0. n s name for image file, default "untitled" Note: If there is too much input, there may not be resources to open a window, and even if there is, parts may be off-screen. The histogram is written to <name>.gif The window is dismissed by a user q event.
[ Full documentation | Source code ]
hsvpick is a simple HSV color picker. The three sliders on the left control red, green, blue; the sliders on the right control hue, saturation, value. The equivalent hexadecimal specification is displayed in the center.
[ Full documentation | Source code ]
hvc is a simple color picker using HVC space. The three sliders control hue, value, and chroma from left to right.
[ Full documentation | Source code ]
img is a simple editor of Icon image strings and other tiny images. An image size of 64 x 64 pixels is around the practical maximum. usage: img [-cn | -gn] [filename | width [height]] -c or -g specifies a palette; the default is -c1. An input file may contain an image string or an image readable by Icon. If no filename is given, a new image (default size 16 x 16) is created. img brings up a window within which: -- clicking on the color palette sets the color of that mouse button -- clicking on the cell grid sets the color of a cell -- shift-clicking on the cell grid sets the button color from the cell -- pressing "W" writes the image string to standard output -- pressing "Q" writes the image string and then exits -- pressing "Z" clears all cells to the color of the left mouse button -- pressing "O" or "L" toggles palette outlining or labeling -- pressing "T" sets the left mouse button to '~' the transparent color -- pressing "R" changes pixels matching the right button color to be the color of the left button
[ Full documentation | Source code ]
This program converts an image to a grid of cells. The options supported are: -s i size of grid cell; default 4 -p s save image of grid with file prefix s; default "img2grid"
[ Full documentation | Source code ]
This program analyzes images whose names are given on the command line and produces a file with the lists of colors used in each. The entries are given in the order of most to least frequent color. The color files have the base name of the image file and the extension ".clr".
[ Full documentation | Source code ]
This program tiles images to fill a window. The supported options are: -s read image strings from standard input; default, use image file names given on command line -p read BLPs from standard input; default as for -s -w i window width, default 640 -h i window height, default 480 -g r gamma; default to Icon default -m manual mode; wait for event before going to next image -a i automatic mode (default); hold pane for i seconds, default 2 -l list names of files on standard output -i save GIF file of each image -n s prefix for image names, default "paper" -b fill window with black at end and hold for event -v size for video recording, 342x240; overrides other settings -M mirror image before tiling In the case of the -m option for images, if the event is a letter, the letter, a colon, and current image name is printed to standard output. In case of the -m option for image strings, if the event is a letter, the image string is written.
[ Full documentation | Source code ]
This program converts images to lists of pixel values. The first line of output gives the dimensions of the image. The extension of the image file is replaced by .lst in the list file.
[ Full documentation | Source code ]
This program reduces bi-level image strings to their lowest equivalent form.
[ Full documentation | Source code ]
This program converts a list of image strings given in standard input to corresponding GIF images.
[ Full documentation | Source code ]
This program converts an image string with the g2 palette to a bi-level pattern.
[ Full documentation | Source code ]
This program converts image strings whose names are given on the command line to GIF files. Image files are expected to have the suffix .ims. The GIF files are written to files with the basenames of the image string files and the suffix "gif". The following option is supported: -l read Icon literal instead of plain string
[ Full documentation | Source code ]
This program displays images listed on the command line and waits for user input typed into the wnodw. If the input is the letter "y", the name of the image file is written to standard output. If the input is "q", the program terminates. Other input is ignored.
[ Full documentation | Source code ]
This program converts an ISD to an ISD with drawdown colors.
[ Full documentation | Source code ]
This program reads a internal structure draft and creates a GIF image of the corresponding weave. The command-line option -n s allows the basename for the GIF file to be specified. Otherwise, it is take from the name field of the ISD. If other command-line arguments are given, they are used as attributes for the window in which the woven image is created.
[ Full documentation | Source code ]
NOTE: The drawdown code is patched in from code in pfd2ill.icn and uses a different method than the others. One way or another, the methods should be made consonant. The option -n s allows a basename to be specified for the image file. It defaults to the name in the ISD.
[ Full documentation | Source code ]
This program creates Encapsulated PostScript and GIF image files from ISDs. The following options are supported: -g draw grid lines on drawdown -h hold windows open in visible (-v) mode -p add showpage for printing -s i cell size, default 6 -v show images during creation; default, don't Other options to be added include the control of layout and orientation. Names of ISDs are taken from the command line. For each, six Encap- PostScript files are created: <base name>_tieup.eps (if given) <base name>_liftplan.eps (if given) <base name>_threading.eps <base name>_treadling.eps <base name>_drawdown.eps <base name>_pattern.eps (colored "drawdown") Corresponding GIFs also are produced. Future plans call for handling "shaftplans" specifying what diagrams are wanted.
[ Full documentation | Source code ]
This program produces a WIF from an ISD.
[ Full documentation | Source code ]
NOTE: The drawdown code is patched in from code in pfd2ill.icn and uses a different method than the others. One way or another, the methods should be made consonant. The option -n s allows a basename to be specified for the image file. It defaults to the name in the ISD. This version is for ISDs without explicit thread-color information.
[ Full documentation | Source code ]
This program is modeled after the Unix xview(1) utility. It takes a list of image files on the command line and displays them in order. The character "n" typed when the mouse cursor is in the image window goes to the next image. The character "q" terminates the display. This program can, of course, only display image types that Icon understands.
[ Full documentation | Source code ]
This is a barebones version of a display of the Julia set. It has deliberately been left simple and free of options so that the basic idea is clear and so that it can be used as the basis of more capable versions. This program is based on material given in "Chaos, Fractals, and Dynamics", Robert L. Devaney, Addison-Wesley, 1990. The point in the complex plane for which the Julia set is computed is given on the command line, as in julia1 .360284 .100376 which displays the Julia set for the complex number .360284 + .100376i.
[ Full documentation | Source code ]
Lots of options, most easily set by with the interface after startup. The only one that isn't set that way is -wn where 'n' is the size of the kaleidoscope window (default is 600 square). Terminology (and options): Window_size (-wN): How big of a display window to use. At the current time, this can only be set via a command line argument. Density (-dN): How many circles per octant to keep on display at any one time. There is NO LIMIT to the density. Duration (-lN): How long to keep drawing circles (measured in in circles) once the density is reached. There is NO LIMIT to the duration. MaxRadius (-MN): Maximum radius of any circle. MinRadius (-mN): Preferred minimum radius. Circles with centers near the edge have their radii forced down to fit entirely on the display MaxOffset (-XN): Maximum offset from center of display (may wrap). MinOffset (-xN): Minimum offset Skew (-sN): Shift probability of placing a circle at a 'typical' offset. Fill (-F): Turns off filling the circles. Clear (-C): After the duration, reduces density back to 0 before quitting. Random Seed: (-rN): Sets the random number seed. Thanks to Jon Lipp for help on using vidgets, and to Mary Camaron for her Interface Builder.
[ Full documentation | Source code ]
This program displays kaleidoscopic images. The controls on the user interface are relatively intuitive -- trying them will give a better idea of what's possible than a prose description here. This program is based on an earlier one by Steve Wampler, which in turn was based on a C program by Lorraine Callahan.
[ Full documentation | Source code ]
In the olden days, computer data was encoded by rectangular holes punched in thin pieces of cardboard about the size of an old dollar. This program simulates a "keypunch", a mechanical device for punching those holes. (Keypunches themselves were programmable, but there's no way to program this one; tab stops are set permanently.) A carriage return feeds a new card. Illegal characters punch a lace column. As with a real keypunch, you can backspace, but the holes don't go away. The shift key turns "UIOJKLM<>" into "123456789". The meta key serves (imperfectly) as the multipunch key. The font was chosen on a Sun workstation and may not be portable.
[ Full documentation | Source code ]
Comments: This program shows how Koch curves work. See the procedure 'helpmsg' for command line options Waits for a window event before closing window
[ Full documentation | Source code ]
This program converts a 0L-system to an Icon program, which when executed, produces the corresponding drawing.
[ Full documentation | Source code ]
This program reads in a 0L-system (Lindenmayer system) consisting of rewriting rules in which a string is rewritten with every character replaced simultaneously (conceptually) by a specified string of symbols. Rules have the form S->SSS... where S is a character. In addition to rules, there are keywords that describe the system and how to draw it. These include the "axiom" on which rewriting is started and optionally the angle in degrees between successive lines (default 90). Other keywords may be present, but are ignored. Keywords are followed by a colon. An example 0L-system is: X->-FX++FY- Y->+FX--FY+ F-> -->- +->+ axiom:FX angle:45.0 xorg:100 yorg:100 Here, the initial string is "FX" and angular increment is 45 degrees. Note that "-" is a legal character in a 0L-system -- context determines whether it's 0L character or part of the "->" that stands for "is replaced by". If no rule is provided for a character, the character is not changed by rewriting. Thus, the example above can be expressed more concisely as X->-FX++FY- Y->+FX--FY+ F-> axiom:FX angle:45.0 The recognized keywords are: axiom axiom for generation angle angular increment for turns length segment length xorg x origin yorg y origin comment comment; ignored Distances increase from left to right in the x direction and from top to bottom in the y direction. As pure-production systems, the characters are symbolic and have no meaning. When interpreted for drawing, the characters have the following meaning: F move forward by length f move backward by length + turn right by angle - turn left by angle [ save current state ] restore current state The file containing the 0L-systems is read from standard input. The command-line options are: -g i number of generations, default 3 -l i length of line segments, default 5 -a i angular increment in degrees (overrides angle given in the grammar) -w i window width -h i window height -x i initial x position, default mid-window -y i initial y position, default mid-window -W write out string instead of drawing -s take snapshot of image. -d i delay in milliseconds between symbol interpretations; default 0 NOTE: The name option that supported multiple L-Systems in one file has been eliminated on the grounds that it introduced too much complexity in use.
[ Full documentation | Source code ]
This is a barebones version of a display of the Lorenz strange attractor. It has deliberately been left simple and free of options so that the basic idea is clear and so that it can be used as the basis of more capable versions. This program is based on material given in "Fractal, Programming in Turbo Pascal", Roger T. Stevens, M&T Books, 1990.
[ Full documentation | Source code ]
Comments: This program display Lindenmayer systems using turtle graphics. There are some built-in L-systems, but users can easily modify these and construct new systems. See the procedure 'helpmsg' for command line options (or run as 'lsys -help') Waits for a window event before closing window
[ Full documentation | Source code ]
This program draws "mandala" patterns. The following options are supported: -g run continuously; ignore user events; default: process user events -l i limit on number of iterations, default 2 ^ 10 -n i maximum number of points, default 50 -s i size of window (width/height); default 256
[ Full documentation | Source code ]
This is a barebones version of a display of the Mandelbrot set. It has deliberately been left simple and free of options so that the basic idea is clear and so that it can be used as the basis of more capable versions. This program is based on material given in "Chaos, Fractals, and Dynamics", Robert L. Devaney, Addison-Wesley, 1990.
[ Full documentation | Source code ]
This program draws portions of the Mandelbrot set according to the values input # on the command line. The method is that described in the articles by Dewdney # in the Computer Recreations column of Scientific American in August '85, # October '87 and February '89. I have problems with colours (not enough of 'em!), so I have used alternated black and white. Those with decent X-terminals will be able to do far better than me. The program certainly doesn't display images as striking as those seen in publications. Perhaps the scaling of the value of k needs to be different? All suggestions gratefully received. It is possible to speed things up by displaying the points row by row rather than randomly, but as the program is resident in the 100 cycle iteration most of the time, this is only ~5% speed-up. Not really worth it. One of Dewdney's articles mentions other methods to speed things up - I will search out the algorithms one of these days... Usage is - xmand startr startc size n & where: startr, startc are the co-ordinates of the lower left hand corner of the area of the complex plane to be displayed size is the size of the (square) area of the complex plane to be displayed n is the number of pixels into which size is to be divided for display purposes For example - xmand -1.5 -1.25 2.5 400 & will display the Mandelbrot set in the 2.5x2.5 region of the complex plane whose s-w corner is -1.5-i1.25. The display will be 400x400 pixels. The program has been tested on a Sun 4 using the Icon compiler, and on a Sequent Symmetry running Version 5 Unix using both the compiler and translator.
[ Full documentation | Source code ]
This program displays the Mandelbrot set in color.
[ Full documentation | Source code ]
Usage: mercator [window options] [palette] Mercator displays the surface of the HLS color space (hue, lightness, saturation) in something approximating a Mercator projection. The white pole is at the top, the black pole is at the bottom, and the fully saturated colors run along the central equator. Colors are usually quantized to one of Icon's color palettes, with the "c1" palette being the default. Specifying a palette of "none" inhibits quantization, generally leading to poor results due to color allocation failure.
[ Full documentation | Source code ]
To get from one image to another, type "n"; to quit, type "q". "s" produces a snapshot and "w" writes the name of the file.
[ Full documentation | Source code ]
This program displays moire patterns. The following options are supported: -g run continuously; ignore user events; default: process user events -i i initial size, default 50 -k i increment, default 1 -l i limit on number of iterations, default 2 ^ 10 -p s palette, default "c2" -s i size of window (width/height); default 256 This program is based on material given in "FractalVision", Dick Oliver, Sams Publishing, 1992, pp. 185-190.
[ Full documentation | Source code ]
Program to allow interactive moving (renaming) of files.
[ Full documentation | Source code ]
This program produces drop repeats and brick patterns.
[ Full documentation | Source code ]
This is a barebones version of a display of the orbit of a quadratic equation. It has deliberately been left simple and free of options so that the basic idea is clear and so that it can be used as the basis of more capable versions. This program is based on material given in "Chaos, Fractals, and Dynamics", Robert L. Devaney, Addison-Wesley, 1990.
[ Full documentation | Source code ]
Othello is a board game based on the older English game Reversi. This program provides a computerized opponent for a human player. To make a move, click on a square to place a piece. The program flips the appropriate pieces, cogitates a bit, and then makes its own move. If you have no legal move, click anywhere to pass. Play ends when neither side can move; the player with the larger number of of pieces is the winner. Commands are issued by pressing a key: N new game G go (the program makes a move; to play white, start with this) H hints (toggle the display of legal moves) Q quit U undo last move (which is cheating, of course) P pass, even if not legal, changing the side to move W write game history to standard output S save current game to a file O open game from a file (or: pass a filename argument when starting the program) 1 to 9 set program lookahead depth (the default is 5) E display an evaluation of possible move choices D start demo mode; press space bar to end demo In addition to the control commands and the click-to-move action, selecting a square by right-clicking or control-clicking makes a move in isolation without prompting a computer response.
[ Full documentation | Source code ]
This program converts color sets from Painter 3 to lists of Icon colors. The lists are saved in files with the base name of the color set and the suffix ".clr".
[ Full documentation | Source code ]
This program reads lines from standard input. If a line is a palindromic sentence (see The Icon Programming Language, 2nd edition, p. 58), it is ignored. If it is not a palindromic sentence, it is written to a window with the outermost characters that don't match highlighted.
[ Full documentation | Source code ]
Usage: palette [name] Palette displays each color available in an image palette along with its index character. The default palette is "c1". Typing a digit (1 to 6) in the window switches the display to the corresponding color palette. Typing a "g" selects the "g16" palette. Typing "l", "o", or "u" toggles the respective drawpalette() flag. The window can be resized.
[ Full documentation | Source code ]
Names ofs BLP are given on the command line. The GIFs have a corresponding basename.
[ Full documentation | Source code ]
This program accepts a list of integer specifications for patterns as the appear in order in a file of patterns. The selected patterns are written to standard output, but not until the end of the input specifications. The name of the pattern file is specified on the command line. Each line of input can be a comma-separated string of either integers or integer ranges. Blanks after commas are tolerated. An example of input is: 1-3, 5 10 13-17 8 which specifies the patterns 1, 2, 3, 5, 8, 10, 13, 14, 15, 16, and 17. Note that the integers need not be in order, although within a range, the lower bound must precede the upper bound.
[ Full documentation | Source code ]
This application provides a variety of facilities for creating and editing graphic pattern specifications. For a complete description, see IPD234: http://www.cs.arizona.edu/icon/docs/ipd234.htm
[ Full documentation | Source code ]
This program takes the name of a file containing tile specifications on the command line. Tiles to be extracted are entered from standard input. Extracted tiles are written to standard output. Options: -b replace selected tiles by blank tiles -d delete selected tiles from specification file -c copy selected tiles, do not blank or delete them. This is the default; -c overrides -b and -d.
[ Full documentation | Source code ]
Usage: pgmtoims [-gn] [file] Pgmtoims reads a PGM rawbits file and writes an Icon image string. The "-gn" option (2 <= n <= 64) selects the palette; g41 is the default. Note that only rawbits-format PGM files can be read.
[ Full documentation | Source code ]
This program provides an optionally magnified view of an image file. Clicking on a pixel produces a pattern specification for the tile with the selected upper-left corner. Options are: -z i zoom factor, default 1 (no magnification) -f use fixed size tiles rather than selection; default selection -w i width of tile, default 32 -h i height of tile, default width -I pick tiles to make icons; implies -z2, -f, -w38, -w38 (the larger size leaves room for error and trimming) -R i specs for ResEdit files; i = 32 or 16 -t trim whitepace around tile Typical usage is picktile image.xbm >image.tle The program terminates if "q" is pressed when in the image window.
[ Full documentation | Source code ]
This program produces image files from color lists, in which the image file contains one pixel for each color. The image files are 16x16 pixels. If a color list has less than 256 colors, the rest of the image is black. If the color list has more than 256 colors only the first 256 are processed. The image file names have the basename of the color list files followed by _p and the suffix .gif.
[ Full documentation | Source code ]
This program plots planes for coordinates in 3-space.
[ Full documentation | Source code ]
A (color) pixmap editor. Left, middle, and right buttons draw different colors. Press q or ESC to quit; press s to save. Capital "S" prompts for and saves under a new filename. Click on the little picture of the mouse to change one of the button's colors. Not very interesting on a monochrome server.
[ Full documentation | Source code ]
This program reads an image whose name is given on the command line and writes it out as an Icon list of pixels in the form of an include file. See the documentation below for details.
[ Full documentation | Source code ]
This program displays successive numbers by lines of corresponding height. When the display area is full, it scrolls from right to left. In this version, input is piped in.
[ Full documentation | Source code ]
This program displays successive numbers by lines of corresponding height. When the display area is full, it scrolls from right to left. If a line has a number followed by a blank and a string, the string is interpreted as a color.
[ Full documentation | Source code ]
This program displays successive numbers by lines of corresponding height. When the display area is full, it scrolls from right to left. If the -p option is given, data is taken from standard input; this is useful when input is piped into the program.
[ Full documentation | Source code ]
A utility for interactive shell scripts. Called from a shell script, it pops up a window, writes its arguments out as a prompt, and echos the user's response to standard output where the shell script can use it (by means of the backquote character).
[ Full documentation | Source code ]
Randweav is an interactive program for generating random weavable patterns. The top and left rows of the displayed pattern are a "key" to the vertical and horizontal threads of an imaginary loom. The colors of the other cells are chosen so that each matches either the vertical or horizontal thread with which it is aligned. The interactive controls are as follows: Colors Specifies the number of different colors from which the threads are selected. If "cycle warp" is checked, the vertical thread colors repeat regularly. If "cycle weft" is checked, the horizontal thread colors repeat regularly. RENDER When pressed, generates a new random pattern. Pressing the Enter key or space bar does the same thing. Side Specifies the number of threads along each side of the pattern. The pattern is always square. Bias Specifies as a percentage the probability that the vertical thread will determine the color of a pixel. If "perfect" is checked, vertical and horizontal threads alternate perfectly, ignoring the bias value. Save Brings up a dialog for saving the pattern as an image. Quit Exits the program. Note that the mouse must be over a numeric field to type in a new value.
[ Full documentation | Source code ]
This program connects lines in all possible ways between i randomly selected points in a window. The value of i is given on the command line (default 20). Large values of i produce unattractively dense structures.
[ Full documentation | Source code ]
This program draws filled color rectangles recursively. The options supported are -w i width of image; default 400 -h i height of image; default 250 -p s palette; default "c3" -g i gap between rectangles; default 3 -i save image file; default no -n s default image file prefix; default "recticle" -m i minimum length of side; default 10 -b i bias -- affects size choices; default 20
[ Full documentation | Source code ]
This program extracts a fixed rectangle from the images given on the command line. The supported options are: -x i x coordinate of upper-left corner of rectangle; default 0 -y i y coordinate of upper-left corner of rectangle; default 0 -w i width of rectangle; default 64 -h i height of rectangle; default 64 -p s prefix for name of saved file; default "rect_"; may be "", in which case the input file is overridden.
[ Full documentation | Source code ]
Rects tiles the window with randomly colored nonuniform rectangles. Pressing the space bar produces a new tiling. Pressing "q" exits the program.
[ Full documentation | Source code ]
This program repeats images a specified number of times. The image names are given on the command line. The supported options are: -h i repeat horizontally i times, default 1. -v i repeat vertically i times, default 1. -a i repeat i times perpendicular to smallest dimension; default 10; and 1 time perpendicular to the largest dimension; overrides -h and 0v. -l i limit size in repeat direction to i; default 256; only applies if -a is in force. -p s prefix to prepend to image name, default "rep_". Can be empty string, in which case the input image is overwritten.
[ Full documentation | Source code ]
This program produces seamless tiles with drawings of circles and rings. It words from characters input to the window: q quit c draw 10 random circles r draw 5 random rings W writes image to GIF file; files are named ring000.gif, ring001.gif, ... E erases the window F fills the window R reverses the colors At present there are no options except those provided for opening the window. Some modifications have been made by Ralph E. Griswold
[ Full documentation | Source code ]
This program makes a simple random abstract sketch. It supports these options: -p i number of points (default 10) -s i size of (square) window (default 300) -r randomize seed
[ Full documentation | Source code ]
[ Full documentation | Source code ]
This program takes a row file or BLP from standard input and writes an ISD for a draft to standard output.
[ Full documentation | Source code ]
This program draws regular stars. See Geometric and Artistic Graphics; Design Generation with Microcomputers, Jean-Paul Delahaye, Macmillan, 1987, pp. 5-7. The window is square. The window size can be given on the command line, default 600. The present user interface is crude. To see all the regular stars that are provided by default, type all from standard input. After each star is drawn, the program waits for an event before going on to the next star. Alternatively, a single star can be drawn by typing its name preceded by an equals sign. The names are rstar01 through rstar06. For example, =rstar02 draws the second star. In future extensions, provision will be made for user-defined stars.
[ Full documentation | Source code ]
This program displays an image, with scolling.
[ Full documentation | Source code ]
[ Full documentation | Source code ]
This program takes image file names and does top/bottom separation and reordering, follows by the same for left and right. The result is an image that tiles seamlessly, although the center part may be a mess. The technique is described in Painter 2.0 Companion. Files are expected to have the suffix .gif. The corresponding files are given the suffix _s.gif.
[ Full documentation | Source code ]
This program is designed to assist in locating areas within an image that, when tiled, produce a desired effect. For example, a background may consist of a tiled image; this program can be used to find the smallest tile for the repeat (by "eye-balling"). Another interesting use of this program is to produce striped patterns by selecting a row or column of an image to get a tile that is one character wide. Sometimes a few rows or columns give an interesting "fabric" effect. The following features are provided through keyboard shortcuts, the File menu, and in some cases, on-board buttons: @D user-drawn selection rectangle @O open new source image @P pick a source image from GIF files in the current directory @Q quit application @S save current selection as an image @T tile selection into source image window Buttons provide for setting and adjusting the selection in various ways. In the drawing mode, the mouse can be used to make a selection by dragging from one corner to another. When the mouse is released, the action depends on the user keypress: "r" return the selection "n" try again "q" exit drawing mode Typing "q" is the only way to get out of the drawing mode. It can be done whether or not there is a selection. Notes: The selection starts as a single pixel in the upper-left corner. The repeat window can be resized by the user.
[ Full documentation | Source code ]
sensdemo illustrates several of the input sensors provided in the program library. It is written to use mutable colors but will struggle along slowly if they're not available. There are four pushbuttons. Buttons "One", "Two", and "Three" just write a line on standard output. The "QUIT" button does what you'd expect. The three vertically oriented sliders control (from left to right) alter the red, green, and blue components of the color in the large square. The individual components appear in the small squares, and the hexadecimal form of the color spec is displayed below the square. The small horizontal slider below the square adjusts all three color components simultaneously. Notice how moving it also moves the three vertical sliders. The largs square sounds a bell if Return is pressed while it contains the cursor. The standard "quitsensor" causes the program to exit when q or Q is pressed anywhere in the window.
[ Full documentation | Source code ]
This program produces files of color specifications for all of Icon's built-in palettes. The output is written to a file whose base name is the palette and whose suffix is ".clr".
[ Full documentation | Source code ]
This program displays pattern tiles given in standard input. The options are: -P show pattern produced by tile; default show tile -i s create image files with prefix s -a run without waiting for event in window -u don't show on-screen images; implies -a -p i start with page i -r i number of rows, default 7 for -P, otherwise 10 -c i number of columns, default 6 for -P, otherwise 12 -n s number pages using s as a prefix -w i width of area for tile; default 48 unless -P -h i height of area for file; default 48 unless -P -d add date line
[ Full documentation | Source code ]
Originally inspired by the Nova television show on chaos. Colorization suggested by Kenneth Walker.
[ Full documentation | Source code ]
This program demonstrates an interesting way to draw the Sierpinski triangle. For an explanation, see Chaos and Fractals, Heinz-Otto Peitgen, Harmut Jurgens, and Dietmar Saupe, Springer-Verlah, 1992, pp. 132-134.
[ Full documentation | Source code ]
This is a barebones version of a display of the Sierpinski fractal. It has deliberately been left simple and free of options so that the basic idea is clear and so that it can be used as the basis of more capable versions. This program is based on material given in "Chaos, Fractals, and Dynamics", Robert L. Devaney, Addison-Wesley, 1990.
[ Full documentation | Source code ]
This is just a simple program to display black-and-white versions of screen dumps. Type the name of an XBM or XPM file on the prompt in the input window. Get rid of an image by click in the image window. Exit the program by clicking in the input window. As an exercise, you might want to make this program more versatile -- and perhaps write a program to do slide shows.
[ Full documentation | Source code ]
This program analyzes images whose names are given on the command line and produces a file with the lists of colors and number of pixels of each color. The entries are given in the order of most to least frequent color. The color files have the base name of the image file and the extension ".spc".
[ Full documentation | Source code ]
Initially, 54 cards are dealt (from two decks shuffled together) into 10 piles (6,5,5,6,5,5,6,5,5,6) with only the top card in each pile face-up. You may pile face-up cards in decreasing order (Ace is smallest) by moving the topmost face-up "run" of cards from one pile to another. A run is a decreasing sequence of cards in the same suit. To perform the move, you may drag the run to its destination, click on the pile containing the run, or type its number. In the latter two cases, the program tries to move the longest run in the pile to the "best" location. You may move any run to an empty pile. To move a partial run, drag or click its deepest card using the center mouse button. A run from King to Ace can be removed from the board (by clicking on its pile or typing its pile number). The 50 additional cards remaining in the deck may be dealt, one to each pile, as long as every pile contains at least one card. The goal of the game is to remove all 104 cards from the board. The following keys are recognized by the program: 'd' Deal. 'u' Undo last move or deal. 'q' Quit. 'e' Print list of face-up cards in pile. (Useful if the pile becomes so big that the card names are obscured.) 'E' Print list of face-down cards in pile. (Cheating) 'n' Start a new game. 's' Save the current game to a file. 'r' Read a game from a file. '1234567890' Move run from indicated pile. 'bfhptvwxyz' Move run from indicated pile. If $HOME/.spdhist exists and is writable at the start of the run, a single history record is written to it for each 'n' or 'q' or 'r' command, unless no cards have been moved.
[ Full documentation | Source code ]
Comments: This program displays polyline based spiral See the procedure 'helpmsg' for command line options (or run as 'spiral -help') Waits for a window event before closing window
[ Full documentation | Source code ]
Comments: This program displays spirograph-like output There are two methods of drawing: epitrochoid, where the secondary circle moves around the outside of the primary circle, and hypotrochoid (the default here), where the secondary circle moves around the inside of the primary circle. See the procedure 'helpmsg' for command line options (or run as 'spiro -help') Waits for a window event before closing window
[ Full documentation | Source code ]
usage: splat [nspots [diameter]] splat draws random circular spots in a window. The number of spots and maximum diameter can be passed as command options.
[ Full documentation | Source code ]
This program draws "spokes" patterns. The following options are supported: -g run continuously; ignore user events; default: process user events -l i limit on number of iterations, default 2 ^ 10 -n i maximum number of spokes, default 50 -s i size of window (width/height); default 256
[ Full documentation | Source code ]
This program takes the left column or top row of pixels of an image and creates a 1 x n or n x 1 image file from it. The result, when tiled, is a striped pattern. This program is useful for creating regular striped patterns from scans. The following options are supported: -d s stripe direction: "h" horizontal (the default) "v" vertical "b" both horizontal and vertical -p s prefix for GIF file names, default "stripes_" -w i width of swatch, default 1 -x i x offset, default 0 -y i y offset, default 0
[ Full documentation | Source code ]
subdemo displays various random designs in a window using the turtle graphics subset library procedures. Click in the window, or enter a character on the keyboard, to start a new design. The following keyboard characters have meaning: w or W: random walk b or B: fractal bush (looks like "desert broom") s or S: spiral design p or P: polygon design t or T: rectangular tiling r or R: radial tiling \n, \r, \t, or SP: choose design randomly q or Q: exit program 0: pause drawing 1, ... 9: set speed of drawing (9 is fastest)
[ Full documentation | Source code ]
This program draws with the eight symmetries of the square - 4mm symmetry. It is based on a simple drawing program by Gregg Townsend. Pressing the left mouse button draws a point. Dragging with the left mouse button depressed draws a line. Pressing and dragging with the middle mouse depressed shows a dashed straight line, which is drawn solid when the middle mouse button is released. Dragging with the right mouse button depressed erases in the vicinity of the mouse pointer. Typing "f" toggles restriction of drawing to the "generating region" which is shaded when drawing is restricted. Typing "g" toggles the grid lines. Typing "p" toggles the background in the generating region. Typing "c" clears the window. Typing "s" takes a snapshot, writing a GIF file. File names begin with a prefix, followed by three digits starting at 000 and increasing, and terminated by .GIF. Typing "q" terminates the session. Grid lines and shading are only provided for servers that support mutable colors. The options supported are: -w i width of the window, default 512 -h i height of the window, default 512 -s i size of square, default 512x512; supersedes -w and -h -p s prefix for image files, default "sym" Note: Although the window does not have to be square, the application is designed to work with a square window.
[ Full documentation | Source code ]
Pressing the left mouse button draws a point. Dragging with the left mouse button draws a line. Pressing and dragging with the middle mouse shows a dashed straight line, which is drawn solid when the middle mouse button is released. Dragging with the right mouse button erases in the vicinity of the mouse pointer. There are several known bugs: Erasing in restricted mode is bogus outside the generating region. Perfectly vertical and horizontal straight lines are not clipped. Some legal straight lines are not drawn. In other words, the clipping logic is not correct.
[ Full documentation | Source code ]
This program reflects and concatenates images in the horizontal and vertical directions to produce composite images with the pmm ("prickly pear") plane symmetry. The resulting images tile seamlessly. The composite images are given the base name of the input images with "_pmm" appended. Warning: This program is slow.
[ Full documentation | Source code ]
Usage: tess [size] The size is optional and defaults to 1024. Keypresses in the window control the animation: x : move x-axis y : move y-axis z : move z-axis a : move the OTHER axis i : move closer in o : move futher out f : freeze rotation r : reset to original settings q : quit up/down/left/right arrows move shape on screen
[ Full documentation | Source code ]
testpatt cycles through a set of test patterns as the return key is pressed. Backspacing cycles in the other direction. The window can be resized at any time. Press "q" to exit.
[ Full documentation | Source code ]
textures illustrates many different patterns that can be created by tiling a 4x4 pixel cell.
[ Full documentation | Source code ]
tgdemo displays various random designs in a window using the turtle graphics library procedures. Click in the window, or enter a character on the keyboard, to start a new design. The following keyboard characters have meaning: w or W: random walk b or B: fractal bush (looks like "desert broom") s or S: spiral design p or P: polygon design t or T: rectangular tiling r or R: radial tiling \n, \r, \t, or SP: choose design randomly q or Q: exit program 0: pause drawing 1, ... 9: set speed of drawing (9 is fastest)
[ Full documentation | Source code ]
This program is designed to assist in locating areas within an image that, when tiled, produce a desired effect. For example, a background may consist of a tiled image; this program can be used to find the smallest tile for the repeat (by "eye-balling"). It's worth noting that interesting images can be found for other settings. For example, another interesting use of this program is to produce striped patterns by selecting a row or column of an image to get a tile that is one character wide. Sometimes a few rows or columns give an interesting "fabric" effect. There are three windows: the VIB control window the source image window a repeat window, which shows the selection from the source image, tiled. The selection from the source image is shown as a marquee in the source image window. When a source image is loaded, the marquee starts with the entire image. The marquee can be changed by buttons and arrow-key events on the control window (not the source image window). The arrow keys have two modes. With no modifier, they nudge the location of the marquee. With the meta-key modifier, they nudge the dimensions of the marquee. The reset button resets the marquee to the entire image. The current selection can be mirrored using the mirror button. The following features are provided through keyboard shortcuts, the File menu, and in some cases, on-board buttons: @M mirror selection @M mirror selection @O open new source image @P pick a source image from GIF files in the current directory @Q quit application @S save current selection as an image The repeat window can be resized by the user, but it is not redrawn until the marque is changed or the refresh button is pushed.
[ Full documentation | Source code ]
Usage: travels [window options] [-q] [npoints] -q (quiet) suppresses commentary normally written to stdout npoints seeds the field with that many initial cities and sets the count for the "reseed" button travels illustrates several heuristic algorithms for obtaining approximate solutions to the traveling salesman problem. Cities may be seeded randomly or entered with the mouse. Speed may be controlled using a slider. The CPU time, number of cities, and path length are displayed on a status line and written to standard output after every major action.
[ Full documentation | Source code ]
Trkvu displays GPS track logs, using color to indicate various characteristics such as velocity, direction, or time of day.
[ Full documentation | Source code ]
Rules: You're yellow, and you leave a yellow trail when you walk. You never stop until you die. You die when you hit something yellow. Use the arrow keys to change your direction. Try to make the best score you can before you die. You only live once. In the beginning it's a black arena with yellow walls and a red 3x3 pixel square somewhere. Walking over a red pixel gives you one point and makes another 3x3 square appear somewhere. So, crossing a 3x3 red square from one side to another gives you three points and makes three other squares appear in random positions. Walking over black pixels is harmless. Sometimes the red squares will appear over your trail. Then some pixels of your trail will become red and you'll be able to cross. The game loop and the outer loop: typing "Q" or Esc or losing when you're playing makes you go to the outer loop; in the outer loop typing "P" or Enter or space restarts the game, and typing "Q" or Esc leaves the program. Source: <http://angg.twu.net/ICON/tron.icn> Htmlized: <http://angg.twu.net/ICON/tron.icn.html> Screenshot: <http://angg.twu.net/ICON/tron.icn.png> See also: <http://angg.twu.net/elisp/tron.el.html> <http://angg.twu.net/elisp/tron.el.png>
[ Full documentation | Source code ]
trycolor repeatedly reads a color specification from standard input and displays a disc of that color. A color specification may be in any of the forms accepted by Icon, for example: blue #ffedcb 50010,60422,8571 dark greenish blue Additionally, the leading '#' may be omitted from hexadecimal forms.
[ Full documentation | Source code ]
tryfont repeatedly reads a font specification from standard input and displays, with their scores, a windowfull of available fonts that best match that specification. The window can be resized when tryfont is paused at a prompt; the new size is used for the next list. Note that tryfont uses the library procedure BestFont() for ranking; this can differ from the rankings used by the Icon runtime system's font selection logic. tryfont can also be run in ASCII mode, without using X windows, by passing a file name as a command argument. The file should contain a list of X fonts, such as from the xlsfonts program. The number of fonts printed on standard output can be specified as a second argument. For details of font specifications, see BestFont().
[ Full documentation | Source code ]
uix translates a user interface prototype or application built by xib, the old X-Icon Interface Builder, into a skeletal application of the form used by vib, the new Visual Interface Builder. The resulting file is a working application containing all the vidgets (buttons, sliders, etc.) from the input file but none of the user Icon code. This must be added manually. Some of the vidget sizes may be incorrect; load and save the file in vib to fix this. usage: uix [file] Input is read from the named file, or from standard input if none is specified. Output is written to standard output.
[ Full documentation | Source code ]
BLPs are read from standard input and their unit generators written to standard output. The following command line option is supported: -c assume complete repeats; default, do not
[ Full documentation | Source code ]
This program loads images and uses scroll bars to pan over parts of an image that is larger than the viewing pane. This program is intended primarily as an example of a simple application with a visual interface.
[ Full documentation | Source code ]
Adapted from a text-display version by Steve Wampler.
[ Full documentation | Source code ]
This program takes the names of image files on the command line and writes a Web page that embeds each image. The following options are supported: -a s alignment, default "bottom" -t s title for page; default "untitled" -n include file names; default no names
[ Full documentation | Source code ]
wevents reports all the events delivered to an Icon window. Each event produces a single line of output. The program terminates after receiving and reporting a ^C, ^D, or DELETE key event. Each event is reported both in Icon terms and in terms of its internal representation. The output fields on each line are: &interval (interval since previous event, in milliseconds) &control, &meta, &shift (modifier keys: c, m, or s if pressed) event returned by Event: keyword name, if any, or else image &x, &y (usually coordinates, but new size for resize event) image() of the first value on the event queue hex dump of the second value (modifier flags and x coordinate) hex dump of the third value (encoded interval and y coordinate)
[ Full documentation | Source code ]
wheel displays a disk made of randomly colored sectors. In addition to the usual window options, the number of sectors may be given.
[ Full documentation | Source code ]
The following option is supported: -n s name; default "untitled" Note: The output is an xencoded ISD. There is a problem where there is treadling with multiple treadles and no liftplan. *Presumably* that treadling can be used like a liftplan, but without, necessarily, a direct tie-up. This problem problem has not been addressed yet. If there is a liftplan, then a direct tie-up is implied by the wording in the WIF documentation. However, that's in the interpretation of the draft. The tie-up produced here is the one given in the If there is a liftplan and a treadling with multiple treadles, the treadling is ignored. Also not handled is the possibility of multiple shafts per thread. This could be dealt with as for the liftplan. The idea is that instead of a threading corresponding to a single shaft, there are some number of different shaft patterns, like there are liftplan patterns. The liftplan is represented as concatenated rows of shaft patterns in the order they first appear. Thus, the symbols used for them can be reconstructed with the ISD is processed. This program does not attempt to detect or correct errors in WIFs, but it does try to work around some common problems.
[ Full documentation | Source code ]
This is a crude version; it does not bother with actually parsing WIF files and it assumes a color range of 2^16.
[ Full documentation | Source code ]
This program converts an XBM file to a pattern specification.
[ Full documentation | Source code ]
This program takes patterns from standard input and applies a transformation to each one, writing the results to standard output. The transformation to be applied is given in terms of command-line arguments, with the transformation first, followed by any arguments, as in xformpat center 32 32 which would attempt to produce a 32x32 centered pattern from each pattern in standard input. Warning: Some transformations can fail. In cae of failure, no pattern is written.
[ Full documentation | Source code ]
Xgamma sets the root window properties that provide device-independent color under X windows. Icon derives the default value of the "gamma" attribute from these properties. Ideally, color properties would be set automatically based on specifications provided by the manufacturer of the monitor. Lacking such specifications, xgamma synthesizes intensity ramps for an ideal monitor characterized by a given gamma value. The phosphor colors, which must also be set, are set to those of a Sony Trinitron monitor based on values from the X11R5 distribution. There are three ways to call xgamma: xgamma m.n set color properties using gamma value m.n xgamma none remove color properties xgamma report gamma attribute inferred by Icon A pipe to "xcmsdb" is opened, so that program must be in the current search path. The default gamma attribute calculated by Icon does not always exactly match the value set by xgamma. The reason for this is unclear.
[ Full documentation | Source code ]
Usage: xpmtoims [-d] [-gn | -cn] [file...] Xpmtoims reads XPM files and writes Icon image strings. -cn or -gn selects the color palette used; -c1 is the default. If -d is given, each image is displayed in a window after conversion. Output is a file of Icon source code suitable for use via $include. Each image is a string constant with a comment. Multiple images are separated by commas. (A window is always required, whether or not anything is displayed, so that the XPM colors can be converted by the window system.)
[ Full documentation | Source code ]
This program provides an optionally magnified view of a tile. File names are given on command line. Image files are written to <basename>_zoom.gif. Options are: -z i zoom factor, default 8 -g provide grid; only supported if zoom factor > 2
[ Full documentation | Source code ]