Keehong Song Pusan Nation University Pusan, Korea www.mathematica.co.kr
"Freedom produces anxiety "
Escape from freedom - Eric Fromm
This article was written with a grant from Korea Research Foundation for the project of "Object-oriented Courseware Development System." The author also wishes to thank Wolfram Research for generous help for this research.
- Introduction
- Methodology
- Software needed to run the Flash files
- Installation
- Examples
- Remarks
- References
Introduction
Grandiose as it might sound, but truly Mathematica has been a significant contribution to humanity as a vehicle for "escape to freedom" from mechanical computation. For instance, in dong and teaching mathematics, Mathematica has fundamentally change the way we deal with mathematical concepts in terms of computation and visualization.
However, a question is raised to the effect that while it empowers the user with a great variety of solving problem capability, its own power and flexibility might backfire to provoke unwanted anxiety within the user. That would be a type of uneasiness and perplexity that the beginning user of Mathematica is likely to experience when presented with a huge inventory of functionality.
The question would be tantamount to "Can freedom become a burden, too heavy for man to bear" so that the user favors simplicity of limitation in user-interface over flexibility and power?
Anyone who has some experience of teaching Mathematica might have observed this type of user discomfort at one point or another in his/her career, probably often in the starters. Typically they are the ones who would rather follow their noses to reach their learning destination.
Although information theory can provides some insight into that question previously raised, here in this article the efforts are focused in the methods to minimize the unwanted anxiety demonstrating "how" instead of "why." BacktoTopMethodology
For our purposes of simplifying Mathematica interface, Flash is an excellent choice with several eminent advantages. First and foremost, it is the defacto web vector graphics standard enjoying the support in major web browsers as a default. Also, it is virtually cross-platform like Java. On top of that, Flash file is bandwidth efficient and can be converted to and from the XML-based SVG for future usability and compatibility, and more. Later in this article, the point will become clearer through hands-on experience with the examples of Flash-enabled user-interface examples.BacktoTop
Software needed to run the Flash files.
1. A copy of Mathematica -- http://www.wolfram.com
2. Jlink -- http://www.wolfram.com/solutions/mathlink/jlink/
3. Java Runtime Environment -- http://java.sun.com/downloads/
4. Flash 6 plug-in and player -- http://www.macromedia.com/downloads/
List of downloaded files:
Java Class files
Mserver.class
TextToConsole.class
JPEGToConsole.class
SVRConnection.class
ServerExtension.class
ServerExtendable.class
Flash and related files
MListFunction.swf
MPalette.swf
MPlot.swf
MPlotAddons.swf
McuteFE.swf
MRegression.swf
MListFunction.html
MPalette.html
MPlot.html
MPlotAddons. html
McuteFE.html
MRegression.html
start.bat
BacktoTopInstallation
Step1. Install Jlink (pre-installed in Mathematica version 4.2) -http://www.wolfram.com/solutions/mathlink/jlink/Installation.html
Step2. Copy all the files to any directory of your choice.
Simply run the "Mserver" by the command similar to the one given below:
Java Mserver "C:\Program Files\Wolfram Research\Mathematica\4.2\MathKernel.exe"
(or double click "start.bat" file). This command is for the Windows system with Mathematica version 4.2 and modify it for your system.When the "Mserver" booted successfully, Mathematica kernel is activated accordingly. Once the Kernel is up, you are ready to run Flash programs and, when finishing, simply press Ctrl-c to quit the program.
note: If you are having trouble with installation, some likely causes are as follows:
1. Jlink is not properly installed
2. If you are getting the error message like, " Exception in thread "main" java.lang.NoClassDefFoundError: Mserver ", then it's possibly because of the Java filename you typed in is either incorrect or missing.
2. Classpath is not set correctly. In this case, you may want to include the current directory as part of the classpath setting.
example: java -cp ".;C:\\Program Files\\Wolfram Research\\Mathematica\\4.2\\AddOns\\JLink\\JLink.jar" Mserver
"C:\\Program Files\\Wolfram Research\\Mathematica\\4.2\\MathKernel.exe"
3. As a remote possibilty, the port number 1111 used by another program.BacktoTopExamples
1. List Functions
This is designed to teach Mathematica language in a menu-driven fashion. Some of notable features are as follows:
1. Click "help" button to display the help files for the given command. With the button checked, you can switch to other Mathematica functions and the content of the help file changes accordingly.
2. Click "draw" button to use the screen as a scratchpad. This function is useful in class room situation to direct the students' direction.
3. Modify the usage given to have hands-on approach in learning Mathematica language.
Try it! ("Mserver" needs to be executed first- see instruction)
2. Palette
This is to represent Mathematica command visually corresponding to the conventional notation. Basically, this is a simulation of Mathematica Front-End although it has a set of different behaviors. Some of notable features are as follows:
1. It has an intelligent word completion capability. For example, typing of "x" yields "x Sin[x" and "s" does "Sin[x" and so on. To change the command move the cursor to the changing position and type the initial letter for the function you wish to compute, say "t" for "Tan[x". However, the feature is disabled for both "Sum" and "Product", where continuous functions are rarely appears.
2. Input change dynamically as the user completes the form so that he/she sees the one-to-one correspondence between the conventional mathematical notation and its corresponding Mathematica function.
3. For the lengthy output, scroll bar appears automatically.
4. The integrating variable is editable.
Try it! ("Mserver" needs to be executed first- see instruction)
3. Cute Front-End
This is to acquaint the user with Mathematica front-end through a simulation approach with a set of cute icon buttons. The purpose of those is, of course, to bring visual relief to the user. Some notable features are as follows:
1. The "mug" icon is to toggle between, so to speak, "informal" and "formal" mode. With a click of the button, "vapor" in a "mug" is shown in an animated fashion, entertaining users. In this mode, several changes take place. First, when mouse is clicked on the colored text, that is to say, when the focus is on an input text field, voice introduction for the corresponding field is activated. Similary, the voice is deactivated when the focus is killed. Second, when the Mathematica command is executed, the graphic output appears in an animated fashion in order to catch the user interest. In this mode, when "rocket" icon is clicked (when Mathematica commands are executed), audio representation of the action is played, which is played once to avoid becoming a nuisance.
2. Mathematica functions are completed in an intelligent manner in the order of frequency in a math textbook.
3. Input validation is activated.
4. "Enter" key also execute the command.
Try it! ("Mserver" needs to be executed first- see instruction)
4. Plot Functions
This is to present Mathematica plot functions in a simplified fashion in a "combo box" style. That way, the user can know about the type and variety of plot Mathematica offers and, more importantly, the options available for each type of plot function. Some of notable features are as follows:
1. Multiple options are selected using standard key combination, which can be edited afterwards in a separate textfield.
2. Once the plot is drawn, the screen can turn into a scratchpad, a useful feature for the lecturer in a classroom.
Try it! ("Mserver" needs to be executed first- see instruction)
Try Add-ons Plot Functions ("Mserver" needs to be executed first- see instruction)
5. More Plot Functions
More plot functions, an impressive and informative set of powerful Mathematica plotting capability, in the add-on package are given here,
Basic usage of the program is about the same as the ones available in a default mode.
6. Linear RegressionAmong many Mathematica Add-on packages, "Linear Regression" package is reconstructed in a Flash-enabled user-interface, which can assuredly be enhanced to outperform any statistics package in the market today in terms of usability and computability. Some of notable features are as follows:
1. Basically, the flow of execution is in the order of what a regular statistical analysis is performed. In other words, this Flash-enabled user-interface encourages the user to plot the dataset, select the model, perform the regression analysis, and validate the statistical model with residual plot. Then later on, more specific statistical analysis can be performed.
2. In guiding the user, error message is designed for several possible situations. For example, an attempt to do residual plot without the regression analysis prompts an appropriate error message.
Try it! ("Mserver" needs to be executed first- see instruction)
Remarks
The Flash examples given in this articles were developed primarily as desktop applications even though it's possible to run them over the Web as the web server approach( using the port number 1111) was taken in connecting Flash with Mathematica Kernel. Here, an important reminder is that it is the user's responsibility about Internet security of his/her computer network in using the computer programs included in this article. Also, another important issue to note is that the use of this application over the Web MUST be done in accordance with webMathematica license terms.
As a design issue, efforts were made to keep the technical complexity of the examples presented in this article to a minimum, as it is easy to become overboard with an array of powerful multimedia functionality of Flash at disposal. Even though, the "tone" of the user-interface should be determined by the nature of the content and maturity the user. The minimalism in design is important considering many of potentially interesting projects that had degenerated into a dizzy eye baloney. When "they do it because they can", the unfortunate outcome is more than likely to result.
When designed with simplicity in mind, the Flash-enabled user-interface will not only give a gentle and entertaining introduction to Mathematica, but also will give an effective demonstration of the wide spectrum of powerful Mathematica functionality in a visually concise manner. It could further motivate and encourage the user to learn more about Mathematica functionality of the user-interface and language through the Mathematica user-interface.BacktoTop
References
1. Wolfram, S., The Mathematica Book, Cambridge University Press (1999)
2. Flanagan, D., Java Examples In A Nutshell, O'relly, (1997)
3. Enete, N., Java Jump Start, Prentice Hall (1997)