From: MX%"Barry.Stedman@UC.Edu" 20-JUN-1994 17:56:35.95 To: MX%"noel@erich.triumf.CA" CC: Subj: RE: Help on building Mandtool Return-Path: Received: from ROCK.SAN.UC.EDU by Erich.Triumf.CA (MX V4.0-1 VAX) with SMTP; Mon, 20 Jun 1994 17:56:20 PST Received: from barry.daa.uc.edu by UCBEH.SAN.UC.EDU (PMDF V4.3-8 #4918) id <01HDRT6GFJ34QO6IG7@UCBEH.SAN.UC.EDU>; Mon, 20 Jun 1994 16:49:20 -0500 (EST) Received: by barry.daa.uc.edu (4.1/1.34) id AA27366; Mon, 20 Jun 94 16:55:01 EDT Date: Mon, 20 Jun 1994 16:55:01 -0400 (EDT) From: Barry.Stedman@UC.Edu (Barry Stedman) Subject: RE: Help on building Mandtool To: noel@erich.triumf.CA Message-ID: <9406202055.AA27366@barry.daa.uc.edu> Content-Transfer-Encoding: 7BIT Hi Noel! Thak you for getting back to me. I also sent email to Uwe. He was very helpful and we managed to sort out the problems. The hglass.cursor is a standard part of sunview but is no longer sent on the openwindows distribution. hglass.cursor is : /* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16 */ 0x7FFE,0x4002,0x200C,0x1A38,0x0FF0,0x07E0,0x03C0,0x0180, 0x0180,0x0240,0x0520,0x0810,0x1108,0x23C4,0x47E2,0x7FFE Uwe also sent some 'instructions' for use that may be helpful. If you select a subrange with the middle mouse button you have to drag the mouse and keep the button pressed to select a rectangle. If you don't do so you only select one point (dx=dy=0) and the resulting image contains only one color (the image is one large point). If you have selected a sub-range you can have a look at the coordinates using the 'mandelbrot' subwindow. There is a button called 'name'. You can use it to determine a filename for the new picture, it will be shown in the file field. To save the picture information push the 'save' button (after selecting an iteration depth in the corresponding field). This will result in a file called *a.d (a.d if it is your first subrange or b.d ...). Now you have to start the command `mand3 -d a.d`. This will calculate the iteration values for this subrange. (Or you can use a background shell-script searching for .d files which calls mand3 for every .d file without a picture file (see Appendix A). The picture data will be stored into a file called *.m (i.e. a.m). Now back to mandtool. Selecting the 'transformation' entry in the main menu you get the transformation window. Enter the file name of the iteration file (i.e. a.m) into the file field, press 'load' and 'doit' and you will get the new picture (it can be saved pushing 'save' in the 'file' subwindow). In addtion you can choose among several transformation techniques using the selector item. Transformation means the mapping of iteration values to colormap entries or color values. In a last step you can modify the colormap using the color edits for the specific picture. If you have stored several pictures for sub-ranges or sub ranges of sub ranges you can click at the area and the picture will be loaded automatically. Or you can get an overview of the sub-ranges of the current pictures by clicking at the lower left corner of the main window. Have you got the hints from the ftp-server stored together with the tar-file? (see appendix C for mandtool and appendix D for mand3) mand3 will be used to do the iterations to build the iteration file. It always uses the same equation for mandelbrot and julia sets. Selection a specific .d file (or by command line options) you can specify the coordinates of the picture. If you want to use an other formula you have to change the iteration function in the programm code of mand3. Sorry about that, but it is hack only done for mandelbrots. If you save a picture using mandtool you can select between two formats: .mi8 special format for pictures including the coordinate info and a raster file. You can select subranges only for files of this file format. .im8 standard sun 8-bit raster files (you should be able to to use a standard xviewer with this format). Using mi2gif (see Appendix B or ftp server) you can convert .mi8 files into .gif files. Hope this will help Uwe ---Appendix-A------ #!/bin/sh PATH="/bin/usr:/bin:/home2/i30fs1/mandel/bin" logfile=".`basename $0`.log" options= if test ! -f "$logfile" then cd /home/i30fs1/ukrueger/mandel/images2 fi start=0 while true do flag=0 for i in `ls $1 *.d 2>/dev/null` do if [ -f "$i" ] then base=`basename $i .d` if [ \( ! -f $base.m \) -a \( ! -f $base.im8 \) -a \( ! -f $base.mi8 \) ] then cmd="mand3 $options -d $base.d $2" echo "starting $cmd at `date` on `hostname`" >>"$logfile" time $cmd 3>&1 >/dev/null 2>&3 | ( read a b c d e f echo "end of $cmd at `date`: $b:$a $d:$c $f:$e" >>"$logfile" ) if [ -f $base.m ] then rm -f $base.Map fi start=1 flag=1 fi fi done if [ $flag = 0 ] then if [ $start = 1 ] then echo "ready at `date`" >>"$logfile" start=0 fi sleep 300 fi done ------------------- ---Appendix-B------ #!/bin/sh if [ $# = 0 ]; then dd bs=64 skip=1 | rasttopnm | ppmtogif else if [ $1 = "-o" ]; then if [ $# -eq 2 ]; then dd bs=64 skip=1 | rasttopnm | ppmtogif >$2 else if [ $# -ne 3 ]; then echo "$0: $0 [ [-o ] ifile ]" exit 1 else dd if=$3 bs=64 skip=1 | rasttopnm | ppmtogif >$2 fi fi else if [ $1 = "-m" ]; then shift while [ $# -ne 0 ]; do base=`basename $1 .mi8` dir=`dirname $1` echo "$1 -> $dir/$base.gif" dd if=$1 bs=64 skip=1 | rasttopnm | ppmtogif >$dir/$base.gif shift done else if [ $# -ne 1 ]; then echo "$0: $0 [ [-o ] ifile ]" else dd if=$1 bs=64 skip=1 | rasttopnm | ppmtogif fi fi fi fi