|
Scientific Graph Calculator |
Author Patrik Lundin
www.lundin.info
|
Description All functions Parameters Known issues License |
| Description |
The GraphApplet 1.0 is a full featured Graphing Calculator with some rare features added.
It is recommended that you use Netscape 4.x or higher or IE 4.x or higher
for this applet and
at least 800x600 resolution with more than 256 colors. Result in older
browsers and with different
resolution or color depth may vary, some problems have been noticed
in older browsers.
The GraphApplet has all the common operators and
functions as expected from any scientific
calculator and combines it with function graphing capabilities.
The GraphApplet supports juxtaposition which means you can write your
expressions just as you
would write them on a piece of paper, for example xcos(x) or 5x^3-6x
The GraphApplet has support for symbolic differentiation using the diff function.
To use the applet as a calculator click on the buttons or use the keyboard
to form your expression
and then press enter or click the Eval button to evaluate.
Note that when you click on a function button it will fill in a left
parenthesis, you will have to match it
with a right parenthesis either by clicking on the ) button
or enter it with the keyboard.
To draw a function enter the function by clicking on the buttons or
enter them with the keyboard
and then press the PlotF button, you can only draw function
of type y=f(x) .
To zoom into an area, select an area with the mouse ( click, hold down
and drag ) and release,
the area you selected will be zoomed in, to zoom out use the ZOut
button.
To reset the bounds to the original x:[-10,10] y:[-10,10] click on
the Reset button.
To clear the input field click the Clear button, to clear a individual
drawed function double click on the
function name in the list to the right of the applet or click on the
Cls
button to clear the whole screen.
To enter something into memory first click the M-> button and
click on either m1 or m2,
to clear the memory first click on MCls and then either m1
or m2
| All Functions |
Calculator Controls
| Eval | Evaluates an expression, the calculator first
tries to evaluate the expression,
if it fails then it tries to draw the expression. |
| Clear | Clears the input area. |
| PlotF | Plots a function of type y=f(x) |
| ZOut | Zooms out the current area with a factor of x2.
( to Zoom into an area, select the area with the mouse and release. ) |
| Reset | Reset the bounds to the original x:[-10,10] y:[-10,10] |
| Cls | Clears the whole drawing area and all functions.
( to clear a individual function double click on the function in the list to the right of the applet. ) |
| M-> | Enters an expression or a value into memory, first click this button and then chose either m1 or m2 |
| MCls | Clears the memory, first click this button and
then on either m1 or m2 to clear that memory.
( note that memory will be gone if you leave the page with the applet and then return at a later point. ) |
| m1 | Memory 1 |
| m2 | Memory 2 |
Operators and Functions
| These operators can be entered either with the buttons on the calculator or through the keyboard. | |
| sqrt | sqrt of a value or expression. |
| sin | sin of a value or expression. |
| cos | cos of a value or expression. |
| tan | tan of a value or expression. |
| atan | atan of a value or expression. |
| acos | acos of a value or expression. |
| asin | asin of a value or expression. |
| acotan | acotan of a value or expression. |
| exp | exp of a value or expression. |
| ln | ln of a value or expression. |
| 10log | The 10 logarithm of a value or expression. |
| fac | The faculty of a value or expression. |
| diff | Symbolically differentiates an expression of one variable. |
| pi | The constant PI |
| euler | The Euler constant, base for the natural logarithm. |
| + | Addition |
| - | Subtraction. |
| * | Multiplication. |
| / | Division. |
| ^ | "Power to" operator |
| These additional operators can be entered only through the keyboard. | |
| sinh | Hyperbolic sine |
| cosh | Hyperbolic cosine |
| tanh | Hyperbolic tangens |
| abs | Absolute value of value or expression. |
| ceil | Returns the smallest (closest to negative infinity) value that is not less than the argument and is equal to a mathematical integer. |
| floor | Returns the largest (closest
to positive infinity) value that is not greater than the
argument and is equal to a mathematical integer. |
| sfac | Semifaculty of value or expression. |
| round | Rounds the argument to the closest mathematical integer. Example: round( 3.4 ) = 3.0, round( 4.99 ) = 5.0 etc... |
| fpart | Returns the decimalvalue of its argument |
| [base]log(...) | Any logaritm. Example: 10log(10) = 1.0, exp(1)log(exp(1)) = 1.0 |
| % | Modulo |
| == | Equal, returns 1.0 if it's arguments are equal or 0.0 othervise. |
| != | Not Equal, returns 1.0 if it's arguments are not equal or 0.0 othervise. |
| && | And, returns 1.0 if both arguments evaluates to 1.0, or 0.0 othervise. |
| || | Or, returns 1.0 if any of it's arguments evaluates to 1.0, or 0.0 othervise. |
| > | Larger than, returns 1.0 if the value of the argument to the left is larger than the value of the argument to the right, or 0.0 othervise. |
| < | Less than, returns 1.0 if the value of the argument to the left is less than the value of the argument to the right, or 0.0 othervise. |
| >= | Larger than or equal to, returns
1.0 if the value of the argument to the left is larger
than or equal to the value of the argument to the right, or 0.0 othervise. |
| <= | Less than or equal to, returns 1.0 if the value of the argument to the left is less than or equal to the value of the argument to the right, or 0.0 othervise. |
| ! | Not, returns 0.0 if it's argument evaluates to 1.0 and returns 1.0 if it's argument evaluates to anything other than 1.0 |
| Parameters |
All the applets colors and even the layout can be controlled with parameters
to the applet.
A parameter is given by inserting a <param>
tag
in between the opening <applet> and
closing </applet> tags.
Example:
<applet archive="gapplet.zip" code="GraphApplet.class"
width=655 height=360>
<param name="appletbg" value="FF0000">
</applet>
The name part of the parameter is one of the names described below and
the value
is the value you specify for the parameter.
Color Parameters
appletbg The
applets background color, default EEEEFF
appletfg The
applets foreground color, default 000000
buttonbg The buttons
background color, default CCCCCC
buttonfg The
buttons foreground color, default 000000
textfieldbg The textfields background
color, default FFFFFF
textfieldfg The textfields
foreground color, default 000000
coordbg The
coordinate systems background color, default 000000
coordfg The
coordinate systems foreground color, default FFFFFF
listbg
The function lists background color, default CCCCCC
listfg
The function lists foreground color, default 000000
Here is an example of how the applet may look if you change all the colors:
The parameters for this color scheme is :
<applet archive="gapplet.zip" code="GraphApplet.class"
width=655 height=360>
<param name=coordbg value=000066>
<param name=coordfg value=ff0000>
<param name=appletbg value=ff0000>
<param name=appletfg value=ffff00>
<param name=buttonbg value=ffffff>
<param name=buttonfg value=000066>
<param name=textfieldfg value=ffff00>
<param name=textfieldbg value=000000>
<param name=listbg value=000000>
<param name=listfg value=ffff00>
</applet>
Layout Parameters
The applet already has the prefered size, if you alter any of these
clipping may occur and the result being a useless applet.
You can experiment with these without any risk, just remove the parameters
if there is a problem and reload or restart your web browser.
Also note that the whole applets size is controlled by the width and
height
attributes in the applet tag itself, if you change any of these parameters
you may need to change the whole applets size.
calcx
calcy
calcwidth
calcheight
The x, y startpoint and width, height for the calculator part of the
applet.
Default 5,5,240,350
coordx
coordy
coordwidth
coordheight
The x, y startpoint and width, height for the coordinate system.
Default 250,5,350,350
listx
listy
listwidth
listheight
The x, y startpoint and width, height for the function list.
Default 601,5,50,350
| Known Issues |
* The recommended use of browser for this applet is Netscape
4.x and higher
or IE 4.x and higher, the applet will work in older browsers but the
result
may vary. For example, in Netscape 3.x various refresh problems was
discovered.