To use JSPgenerator you need a basic knowledge about the syntax of the Javasketchpad applet.
You can get this information at Key Curriculum Press It is advised that you get yourself a copy of the JSP Construction Grammar that can be found at this website.

How to use JSPgenerator to generate JSP-files

Consider the following example from Key Curriculum Press' website.

For instance, the following text specifies a dynamic triangle with vertices initially positioned at (144, 130), (24, 130), and (84, 20) in the coordinate plane:

{1} Point (144,130);
{2} Point (24,130);
{3} Point (84,20);
{4} Segment (3,1) [thick];
{5} Segment (1,2) [thick];
{6} Segment (2,3) [thick];

In JSPgenerator this becomes:


In JSP you reference by number to an element in your construction. This number is the line number of that element. When you are editing your construction you may not insert a line: all references have to be updated. In JSP generator you reference by a unique name, a variable (a variable name starts with a character, after that character are allowed: more characters, digits or underscores _). The optional format string ([thick] in this case) is moved inside the brackets. JSPgenerator allows you to leave out the square brackets but you may also use them. When you don't need a construction to be referenced by another construction it is not necessary to use a variable.
A list of construction names can be found in the file help.htm

Special cases

Predefined extensions

Besides the existing JSP constructions there are a number of predefined extensions that generate a sequence of JSP constructions: PerpendicularBisector, Circle3Points, InscribedCircle,AngleBisector and AngleBisector2,Arc and Arc2, Parabola, Ellipse_Hyperbola,Bezier, graph and graph2,pie. More information can be found in the file help.htm

Technical information

All JSP constructions are defined in the external Javascript file common.js. All extensions are defined in the external Javascript file extensions.js. Both JSP constructions and extensions are defined as Javascipt functions that generate the necessary strings to generate the construction (they presume a variable construction and a variable lino) and return the linenumber of that construction.
Those two external files make it possible to write a Javascript program that generates the construction. Two such programs are provided: Bezier and JSPgenerator itself. Bezier shows the construction of Beziercurves. JSPgenerator allows you to make constructions by means of scripts. Those scripts are edited in the upper window. By pressing convert the JSPconstruction is generated. By pressing preview the construction can be made visible.

Advanced features of JSPgenerator

The scripts you write in the upper window of JSPgenerator may contain pure Javascript. You can even define new functions, use conditional (if) statements, use loops in these scripts. All features of Javascript are allowed. Example 3 and Example 4 show some of the possibilities.

Browser dependent features