Instructions for using the catalog

Samuel Dagan

Last Update: 17 May 2012



The function y=sin(x) was used for the example presented at Plotting mathematical functions. The output file of the program gives the following path, consisting of 16 Bezier intervals (or 16 control points):

<path d="M0 0Q0.037176 0.037176,
0.055767 0.055738,0.078004 0.077941,
0.096601 0.096451,0.135129 0.1348,
0.16737 0.166589,0.234165 0.232452,
0.290165 0.28611,0.406182 0.397277,
0.504011 0.482941,0.706642 0.660376,
0.880689 0.771178,1.062604 0.886988,
1.232824 0.943429,1.403437 1,
1.570796 1" style="stroke:black; fill:none;"/>

SVG will display this with "y" pointing down. In order to have it in the right mathematical direction, one have to
transform="scale(1,−1)"
or to to run the program for the function
y=−sin(x)
The later is the way things are mostly done in the catalog.


If one wants to use N user units (say N=100) as one x or y unit, one could make the transformation:
transform="scale(100,100)"
but then, the stroke-width values are displayed in different matter for different locations, since they are also transformed. In order to avoid that, one can run the program by defining the function as
y=−100f(x/100)
instead of
y=−f(x) .

For convenience, most of the functions are scaled by 100 in the catalog, and their scaling is stated explicitly for each case.


The errors are stated for each case. If for instance the error is 0.0001 for
y=−f(x) (without scaling),
this is equivalent to error of 0.01 for the case of
y=−100f(x/100) .

The number of control points (c.p.) means also the number of Bezier intervals.


Here are the links to the text files containing the Bezier paths of the functions:

cosh (cosine hyperbolic)
cosh-1 (1/cosh)
exponent (y=e^x)
hyperbola (x^2-y^2=1)
oneOverX (y=1/x)
sine (y=sin(x))
sinh (sine hyperbolic)
tangent (y=tan(x))
tanh (tangent hyperbolic)
xOnMn2 (y=1/(x^2))
xto4 (y=x^4)