JiScript - dynamic mathematical illustrations

JiScript is a package that enables programmers to create mathematical illustrations in Java by writing Python code. The guiding principle is that JiScript should make the production of high-quality Java illustrations, including animations and other interactivity, as effortless as possible.

Of course, one could program directly in Java. JiScript offers at least two advantages, however. First, the graphics commands in JiScript are the same as those in Bill Casselman's PiScript, a Python package that produces PostScript figures. It is therefore possible to produce either PostScript or Java graphics using the same set of commands.

Second, because JiScript programs are written in Python, they are typically much shorter and developed much more efficiently than Java programs. JiScript uses Jython, a Python interpreter written in Java, to produce Java bytecode. This means that JiScript can produce Java applets, which may be widely distributed over the Internet.

Note: This package was originally called JyScript. The name was changed to JiScript to reflect its close connection with PiScript.

Examples

Box.jy BoxButtonReset.jy BoxPoint.jy
KeplerAnimation.jy

Downloads

The JiScript files, including demonstrations. Installation instructions are given below.

Documentation

JiScript User's Guide

A related project

PiScript, Casselman's documentation explains the graphical component of both PiScript and JiScript.

Simple installations you will need

The Java Developer's Kit

Jython

Installation instructions

1. Unzip the file jiscript.zip into a directory (folder).

2. Edit the registry file in the jython installation so that the python.path variable points to that directory. For example, on my linux machine, JiScript is installed in /home/david/jiscript and Jython is installed in /home/david/jython2.2.1.

The registry is /home/david/jython2.2.1/registry, and I edited one line to read python.path = /home/david/.

3. Include the jython and jythonc executables in your path. For example, in a bash shell, type something like

export PATH=/home/david/jython2.2.1:$PATH

Running a Jython file

Jython can be used to create Java applications and Java applets. If the code for a Java application is in a file called, say, App.jy, it may be run from the command line with

jython App.jy

Questions, comments, refunds?

David Austin (austind [at] gvsu [dot] edu)