Number Theory Laboratory


Input

Input via Keypad

A quick, and easy method of entering expressions into ColorCalc is with the keypad. Set up like a traditional calculator, the keypad affords learnability. It works in the same way as a normal calculator, with computation of expressions executed by clicking the Equals key.

Input via Formula Entry Box

ColorCalc accepts input in the form of Maple expressions in the Formula input box located near the top right-hand corner of the applet. To enter an expression, simply click in the input box to give it focus, type in your expression and hit the <Enter> key. As with entry via the keypad, computations are initiated by then clicking on the Equals key located near the bottom right-hand corner.

Input via Edit Window

ColorCalc also provides a multi-line edit window for entering multi-line Maple expressions. To enter input with this method, click the Edit key and a new window will open up. Enter expressions into the window as with a normal editor. To close the window, click Save to keep your changes or Cancel to discard your changes. The Clear button will clear the contents of the Edit window. As with the other entry methods, hitting the Equals key will started computation of your Maple code.


Output

Output Box

The textual output generated by Maple is displayed in this output box located in the top left-hand corner of the output.

Render Panel

The results from Maple is graphically represented in the large panel that dominates the laft half of the applet. This render panel as several viewing options that can be changed with various controls located on the applet. There are two rendering modes: Rectangular and Triangular. By default, the viewer renders in Rectangular mode but by clicking the the Render Triangle button, the viewer shifts into Triangular rendering mode. Also by default, the viewer automatically selects the size of the blocks to best fit the data into the rendering panel. This can be turned off my clicking Manual Sizing. In Manual Sizing mode, the user can manually select the number of rows and columns by entering the desired values into the Rows and Cols input boxes respectively. As with all input boxes, <Enter> must be pressed for changes to be effected. In Trianglular rendering mode, only the Cols input box affects the size of the blocks. The number of colors used to render the results is controlled by the Mod input box. Again, <Enter> must be pressed for changes to appear.


Miscellaneous

Setting Result Lengths

The number of digits Maple evaluates expressions to is set with the Length input box. This box allows for a long result to be computed while still allowing the user to manually size the renderer to display a smaller portion of the results without redundant recalculations. To change the length and for the changes to affect the rendering, the desired expression must be recalculated. To do so, first change the length in the Length text box and hit <Enter>. Then the expression must be reprocessed by hitting <Enter> in the Formula box. Finally, the Equals key must be struck for results of a new length to be calculated.

Correspondence Between Digits and Blocks

The digit associated to a particular block can be easily found. To do so, simply click on the block you wish to see the value of and its corresponding value will show up in the Digit box found along the bottom of the applet.

Viewing Rendered Result

The final rendered results can be popped up into a separate frame. By holding down the <Shift> key and clicking on the rendering panel with the left mouse button will open up a new frame containing your image.

Loading Pre-Defined Expressions

ColorCalc provides a facility for loading Maple expressions and code previously saved. To load a pre-defined expressions, select the desired expression from the list box by clicking on it. You should see the name of your selected expression appear in the box labeled Formula Name. This expression is now loaded into the editor where you can edit it if so desired (by clicking on Edit) or evaluated (by clicking Equals).

Saving User-Defined Expressions

In order for a user to save his or her own Maple code, a few things must first be ensured. Firstly, the user must name their functions by typing in the Formula Name text box, taking care to make sure that no spaces are used in the name. Again, the <enter> must be pressed when the formula name has been entered. Secondly, the name must not be ContinuedFraction or Sequence, as those are pre-defined expression and cannot be overwritten. Please note that user-defined functions can be overwritten by using the same filename. Also note that only the contents of the Edit window can be saved. Expressions entered with the Formula text box cannot be saved.