This work was done to improve the visualation of antenna radiation patterns for various antenna geometries. It has been integrated into Professor Eric Michielssen's course site at the University of Illinois (ECE 354-Antennas). Stephen Fisher and Andrew Lowery collaborated to make the script modifications. For technical questions regarding the script or installation of the script you can e-mail Stephen Fisher at sefisher@uiuc.edu. For course related or antenna theory related questions you can contact Eric Michielssen at michiels@decwa.ece.uiuc.edu. We hope our efforts help you in your work and would appreciate hearing if it did. Remember to check at MathSource or search for updates to this package and the VRMLConvert.m (named VRML.m here) package since this is new stuff and always being improved and altered. H.E. Donley says a new version of VRMLConvert.m (2.0) is upcoming, so be on the lookout. (*** If anyone is interested in collaborating to try and get this working under Windows95 and WindowsNT I'd appreciate it: sefisher@uiuc.edu We need to find a Win/DOS equivalent to ppmtogif, and ppmquant. The unistd.h stuff is easily removed but the graphics converters are hard to come by. ***) **************************************************************** * NAME CHANGE!!!!!! READ THIS TO AVOID MASS CONFUSION!!! * * * * math2html was previously called mma2html. This change was * * made at Wolfram's request. All references to mma2html still * * refer to math2html. Don't let yourself be confused, only * * the name was changed the porgram is the same (in case you've * * used the script before). * **************************************************************** This file is to help installation of mma2html and mmaeval. Both of these where orignally written by H. Edward Donley. I've modifed them to convert 3d Mathematica objects to VRML images and post them as a result. This process uses VRML.m (a conversion package also wirtten by Donley). H.E. Donley's site has his original version of both mma2html (a perl script) and mmaeval (a C program). If you find my installation to brief his more detailed installation instructions follow: Installation: 1. You'll need the following software: -Mathematica (included with Unix distribution of Mathematica or with Mathlink developers kit). -rasterps (included with Unix distribution of Mathematica or with Mathlink developers kit). -mathlink.h (included with Unix distribution of Mathematica or with Mathlink developers kit). -ppmtogif and ppmquant (from Netpbm folks. Do a Yahoo search for Netpbm) -mpeg_encode (used to turn adjacent images into mpeg's to simulate the Mathematica animate function) -an ANSI C comilper. (unistd.h is also needed so for now this will work only in Unix.) -if you want mma2html to work you need to have a perl interpreter as well. It also uses raterps and the Netpbm stuff. -gzip (if you want to use the compression option for VRML objects that mmaeval produces.) -giftrans (a program used by mma2html to make the backgrounds of the mathematica images transparent) Included files: -ReadMe.txt <-- This very helpful file. -mmaeval.c <-- C program that interfaces with Mathlink. -util.c <-- NCSA code that provides a few c functions for mmaeval.c (compile this file with mmaeval.c). -mma2html <-- Perl script that converts a normal mathematica document to a HTML document which does the form input for mmaeval. -mma2html.man <-- man page for mma2html. -mma2html.txt <-- text version of man page. -VRML.m <-- VRML package loaded into Mathematica via Mathlink. -VRMLfix.m <-- Package loaded that alters Mathematica's Display function to allow VRML conversion. -Miscellaneous images <-- Put these in a "dingbat" directory along with any other images you have the scripts use. This directory's path is put in the script and it's function is described in mma2html and mmaeval.c. The logo.gif file is the image we use at Michielssen's ECE 354 site as a header. You'll want to make your own. 2. Install the above into your system. The .m files should go into the Package directory of Mathematica. Make a symbolic link to there from you cgi-bin (name it what ever you like). Type "man ln" to read about making the link. Once all that is installed open mmaeval.c and edit the local variables. They are pretty self explanatory. Read Donley's Copyright if you plan on making changes as I have. This still falls under his Copyright since the core of this is his intellectual property. 3. Compile both mmaeval.c and util.c with mcc (included with Mathematica for unix, it prep's the .c file and then calls your compiler). It does the same thing as mprep but goes one step further by calling the compiler. Command: mcc -o mmaeval.cgi mmaeval.c util.c 4. Put mmaeval.cgi in your cgi-bin. 5. Put mma2html in cgi-bin (or wherever you stick perl scripts that you call on your system). 6. Make an HTML file with mma2html from a Mathematica notebook. (see mma2html man page). Command: mma2html -o file.ma where file.ma is the notebook. You need exactly one Title cell in this notebook and at least one input cell to make into a text field. 7. Go to the page and use your new form. Edit the HTML if you want to change the wording etc.. Just don't mess up the form variables. 8. Have fun. Again-- if you need help mail: Stephen Fisher at sefisher@uiuc.edu To see the scripts in action go to: http://euler.ece.uiuc.edu The interface (converted by mma2html) is in the Mathematica section of the site. We use the gzip compression option at our site and recommend Live3D (from Netscape) for viewing these compressed VRML objects. ################################################################## H.E.Donley's original installation instructions follow: INSTALLING math2html You may also be interested in a related utility that the author has written to interactively evaluate Mathematica commands using Web forms. See the program mmaeval in ftp://ftp.ma.iup.edu/pub/math2html. However, mmaeval is only an alpha version program. 1. Install the prerequisite utilities. a. Math2html is written in perl. Since perl is an interpreted language, you will need to have perl available in order to run math2html. Type % which perl or % find / -name perl -print to see if perl is installed at your site. If not, it can be ftp'ed from many Internet sites, including ftp.uu.net 137.39.1.2 ftp.netlabs.com 192.94.48.152 coombs.anu.edu.au 150.203.76.2 archive.cis.ohio-state.edu 128.146.8.52 jpl-devvax.jpl.nasa.gov 128.149.1.143 prep.ai.mit.edu 18.71.0.38 ftp.cs.ruu.nl 131.211.80.17 (Europe) You will also need the getopts.pl library file that comes with the perl distribution. b. Math2html uses ppmtogif and ppmquant to create GIF graphics. These are part of the free pmbplus graphics conversion package available at many sites on the Internet, including at MathSource (ftp.wri.com) item number 0205-355. c. If you plan to create animations, you will need mpeg_encode, which is also a free program available on the Internet. You can get it at ftp.cc.utexas.edu in /source/graphics. d. If you plan to create transparent backgrounds for your GIF images, then then you need to retrieve the free program, giftrans, from the Internet. You can get giftrans.c and its man page, giftrans.1, from ftp.rz.uni-karlsruhe.de in /pub/net/www/tools. Compile it with the command % cc -o giftrans giftrans.c 2. Uncompress and unpack the archive. % uncompress math2html.1.1.tar.Z % tar xvf math2html.1.1.tar 3. Place the section.gif, subsection.gif, and subsubsection.gif files on your web server in a convenient directory. % cp *section.gif webdirectory. % chmod +r webdirectory/*section.gif 4. Edit the local definitions at the beginning of the math2html script. The variables are explained in the script. 5. Place the math2html executable in a directory in your search path. For example, % cp math2html /usr/local/bin 6. Install the man page. % cp math2html.man /usr/man/manl/math2html.l VERSION HISTORY Version 1.1b ------------ o Fixed a bug, forgot to place

after an HREF to an mpg movie. Version 1.1a ------------ o Renamed mma2html.1.1a to math2html.1.1a. o Fixed a bug from version 1.0. If an output cell was the first cell in a closed group, then mma2html would try to strip out the input form twice. o A change in version 1.1 caused it to be incompatable with Perl 4. The offending line was strip(). This has been fixed, so that mma2html 1.1a is compatable with both Perl 4 and Perl 5. Version 1.1 ----------- o Added -r option for converting background color of GIF images to tranparent. o Added -n option to convert tabs to spaces. o Added -s option to scale in-line graphics by a user-specified factor. o Inserted new lines in text cells so that they fit in 80 columns. This is not necessary for Web viewing, but it is helpful for those who want to edit the HTML files. o Changed access privileges on html, gif, and mpg files to 644 so that they can be accessed by web server. o Added , , and HTML directives to conform with standards. Consequently, the first cell in the Mathematica notebook must now be the title cell. INSTALLING mmaeval If you are interested in a similar product with commercial support, check out HTML Mathematica at http://www.vut.edu.au/MW/. HTML Mathematica is not expensive and its features differ somewhat from mmaeval's. However, neither of these programs allows the user to maintain a history of variable definitions, so these are not fully functional front ends for Mathematica. You may also be interested in a related utility that the author has written that converts Mathematica notebooks to HTML format. See the program mma2html in ftp://ftp.ma.iup.edu/pub/mma2html. Installation instructions: 1. Install required utilities. a. Mma2html uses ppmtogif and ppmquant to create GIF graphics. These are part of the free pmbplus graphics conversion package available at many sites on the Internet, including at MathSource (ftp.wri.com) item number 0205-355. b. If you plan to create animations, you will need mpeg_encode, which is also a free program available on the Internet. You can get it at ftp.cc.utexas.edu in /source/graphics. 2. Uncompress and unpack the archive. % uncompress mmaeval.0.3.tar.Z % tar xvf mmaeval.0.3.tar 3. Edit the local definitions at the beginning of mmaeval.c. The variables are explained in the program. 4. Compile mmaeval. You need to use the mcc compiler that comes with the Unix Mathematica distribution. It includes the necessary MathLink definitions. util.c is included in the mmaeval archive. It comes from the cgi-src directory in the NCSA httpd distribution. % mcc -o mmaeval mmaeval.c util.c 5. Place the mmaeval executable in your Web server's CGI bin directory. For example, % cp mma2html /usr/local/etc/httpd/cgi-bin % chmod 755 /usr/local/etc/httpd/cgi-bin/mmaeval 6. Create a directory to hold temporary graphics files. This directory needs to be under your Web server's root directory. It's name is specified in the variable definitions at the beginning of mmaeval.c. For example, % mkdir /www/tmp % chmod 777 /www/tmp 7. Edit /etc/crontab to clean out the temporary directory periodically. For example, if every day at 4:15 AM you want to delete all files that are more than one day old, add the following line to your crontab file 15 4 * * * ( cd /www/tmp; find . -mtime +1 -a -exec rm -f {} \; ) 8. If you are using mmaeval with mma2html, define mmaeval's URL, $cgi, in the mma2html script. Mma2html is available at ftp://www.ma.iup.edu/pub/mma2html/. If you are unfamiliar with CGI programs, you might want to check out http://hoohoo.ncsa.uiuc.edu/cgi/overview.html. SECURITY ISSUES Mmaeval is a *very* insecure program. The problem is that Mathematica includes a Run command for executing Unix system commands. However, if you are running your Web server without authentication, then you are allowing unauthenticated users full access to your system. You should read about Web security in http://wintermute.ncsa.uiuc.edu:8080/auth-tutorial/tutorial.html. If this makes you nervous, which it should, then run your Web server with authentication, or do not install mmaeval. Mathematica World claims that HTML Mathematica is a secure product, so you may want to consider it as an alternative. ACKNOWLEDGMENT This software was developed at Indiana University of Pennsylvania, U.S.A., on equipment partially funded through the National Science Foundation Instrumentation and Laboratory Improvement grant number DUE-9351896. It was inspired by a suggestion from Phillip Kent at Imperial College, U.K. John Cross at Indiana University of PA helped me with some of my C problems. Since I'm a novice C programmer, this was much appreciated. Suggestions, corrections, or comments should be sent to the author, Ed Donley, at H. Edward Donley Mathematics Department Indiana University of PA Indiana, PA 15705 U.S.A. hedonley@grove.iup.edu http://www.ma.iup.edu/MathDept/Professors/HDonley.html ####################################################################