* EXAMPLES

If you want to visualize the graphic of the function 

   y(x) = x^2 -3x +2

(x^2 is x squared) in the interval [-3, 4], i.e. for the values of x between
-3 and 4, then, after starting the program, you should enter the text

   x^2 -3x +2 

in the entry with the label "y(x) =". Type then the value -3 in the entry 
"Min:" and the value 4 in the entry with the label "Max:" inside the frame
"Variation interval of x". You can leave the number of subintervals at
its default value, i.e. 200.
If you click on the "Display/Update graphic" button, the output page
arises and shows the graphic of the given function.
By default, grid, tics and axes are not visualized: you should toggle on
the corresponding check buttons of the output page to display them.
Mind that in two-dimensional graphic mode x- and y- axis are always
drawn through the central point (x0, y0) of the graphic, which often
does not coincide with the origin. You can read the values of its
coordinates x0 and y0 on the top side of the canvas.

In this particular case x0 is 2 and y0 is 1.3; if you want to see
the intersection of the graphic of the function with the x-axis going through
the origin, you have to move the graphic upwards by clicking on the
"y+" button, once with the left mouse button and three times with the
right mouse button. Clicking on the left mouse button produces indeed a 
movement whose step is equal to the grid step, clicking on the right mouse
button a movement with a step equal to 1/10 of the grid step.

Since in this case the grid step is 1 (as shown on the top side of the canvas)
1 left click + 3 right clicks corresponds to a step of 1.3.
Observe that at each click on the "y+" button the graphic moves upwards
while the value of y0 decreases.

We consider now an example in three dimensions. Assume you want
to visualize the graphic of the function

   z(x,y) = 3*sin(6*sqrt(x*x+y*y))

for both x and y in the interval [-2*pi, 2*pi]. * is the product operator
(or multiplication sign, if you prefer),  pi  is the well known constant
defined as ratio of a circle's circumference to its diameter, pi ~ 3.14159...,
and  sin  is the sine function (see http://en.wikipedia.org/wiki/Trigonometric_functions). 
To visualize this graphic, leave the definition type set to cartesian but click
on the "3D" radio button to select the three-dimensional graphic mode.
Then enter the text

   3*sin(6*sqrt(x*x+y*y))

in the entry with the label "z(x,y) =", type  -2*pi  or  -2pi
in the entries labeled with "Min:", and  2*pi  or  2pi  or +2pi
in the entries with the label "Max:".
Both for x and y you can leave the number of subintervals at its default value,
i.e. 50.  
Finally, click on the "filled" radio button in the "Plot style" frame and
on "Display/Update graphic" to switch to the output page and see the graphic of
the function.
The graphic looks like a wavy surface with many pleatings.
If you look at it better, you realize that the waves are sharp cornered
(increase the image to 120% to see it clearly).
This is due to the fact that the default value for the number of
subintervals is in this case too low to get a smooth surface.
Go back to the input mask by clicking on the corresponding button
of the output page, set the number of subintervals to 100 for both x and y
and click again on "Display/Update graphic". The displayed surface looks now
much smoother.

This example also shows that it is possible to use the constants pi and e
in the definition of the minimum and maximum of a parameter. You can
type actually any mathematical expressions containing these constants
in the entries for minimum and maximum. GTKMathplot will first check 
each of them for its correctness, then will evaluate every expression and use
the result as value for the corresponding minimum/maximum.

If you are interested in examples involving parametric equations read further.

** PARAMETRIC EQUATIONS

We assume that in the plane is assigned a cartesian coordinate system
(see http://en.wikipedia.org/wiki/Cartesian_coordinate_system).
The parametric equations of a two-dimensional curve describe the curve
as the set formed by the points (x(t),y(t)) when the 'time' parameter 
t goes from a value t1 to a value t2 > t1. Here x = x(t), y = y(t)
are mathematical functions of the variable t.
For example, the parametric equations of the circumference (circle)
centered at the point (0,0) and having radius equal to 1 are

        x(t) = cos(t)

        y(t) = sin(t),  with  0 <= t <= 2pi,

since the point (sin(t), cos(t)) draws exactly the unit circle centered
at (0,0) while t goes from 0 to 2pi (cos  is the cosine function, sin
is the sine function, look at http://en.wikipedia.org/wiki/Trigonometric_functions
if you do not know how they are defined).

The graphic of a function y = f(x) can always be seen as a 2D-curve described
by parametric equations. If x varies in the interval [a, b] (a and b are
two numbers with a < b), then the graphic of  y = f(x)  is the set of
points with coordinates (x, f(x)) for x greather or equal than a and
less or equal than b. Therefore, it can be represented through the
parametric equations

        x(t) = t

        y(t) = f(t),    with a <= t <= b.

To describe a surface (planar or three-dimensional) two parameters are needed.
In GTKMathplot s and t are used as parameters. 
One simple example is the planar surface enclosed by the border of the circle
of radius 2 centered at (0,0) and the border of the circle with the same center
but radius equal to 1.   
This surface has parametric equations

        x(s,t) = s*cos(t)

        y(s,t) = s*sin(t),           with 1 <= s <= 2, and
                                          0 <= t <= 2pi.  

Here s is the distance from (0,0) and t is the 'angle'.

In three dimensions three coordinates are needed to uniquely identify 
the position of a point 
(http://en.wikipedia.org/wiki/Cartesian_coordinate_system#Cartesian_coordinates_in_three_dimensions). 
The parametric equations of a three-dimensional curve describe the curve
as the set formed by the points (x(t),y(t),z(t)) when the 'time' parameter 
t goes from a value t1 to a value t2 > t1. x = x(t), y = y(t), and z = z(t)
are mathematical functions of the variable t.
As an example,

        x(t) = cos(t)

        y(t) = 0

        z(t) = sin(t)

are the parametric equations of the circle centered at the point (0,0,0)
which lies on the plane defined by x- and z-axis and has radius equal to 1.

The parametric equations of a three-dimensional surface describe the surface
as the subset of the space formed by the points (x(s,t),y(s,t),z(s,t)) 
when s and t vary from s1 to s2 and from t1 to t2 respectively, 
where s1 < s2  and  t1 < t2.
For example, the sphere centered at (0,0,0) with radius equal to 1 has

        x(s,t) = cos(s) * cos(t)

        y(s,t) = sin(s) * cos(t)

        z(s,t) = sin(t),            with      0 <= s <= 2pi  and
                                          -pi/2 <= t <= pi/2

as its parametric equations, since the point (x(s,t),y(s,t),z(s,t)) describes
exactly this sphere while s goes from 0 to 2pi and t goes from -pi/2 to pi/2.
Mind that  s  and  t  are, respectively, the 'longitude' and the 'latitude' 
of the point (x(s,t),y(s,t),z(s,t)).

Given the function z=f(x,y), the parametric equations of its graphic over the
rectangle { (x,y) | x in [a,b], y in [c,d] } are

        x(s,t) = s          

        y(s,t) = t       

        z(s,t) = f(s,t),            with      a <= x <= b  and
                                              c <= y <= d.

** CAVEAT

If you set the definition type to parametric, the entries for the equations
always get the labels "x(s,t) =", "y(s,t) =" and "z(s,t) =".
Despite of this, if you want to draw a curve instead of a surface
you can use only one parameter in the equations, and this
parameter must be  t. 

If only the parameter  t  appears in the equations, then the minimum, 
the maximum and the number of subintervals eventually specified for the
parameter  s  are ignored.
