#Graph library for FunctionGraph

#Graph categories
Categories=Polynomial,Trigonometric,ConicSections,Numeric,Scientific,Esoteric

#Category definitions
Polynomial=Linear,Parabola,Cubic,Quartic, Hyperbola1, Hyperbola2
Trigonometric=Sine,Tangent,InverseSine,InverseCosine,InverseTangent,HyperbolicSine,HyperbolicCosine,HyperbolicTangent,\
   InverseHyperbolicSine,InverseHyperbolicCosine,InverseHyperbolicTangent,SineCompressed,\
   SumOfSines, ProductOfSines,FourierSum 
   
ConicSections=Parabola, HorizontalParabola, CircularArc,ParametricCircle,\
 ParametricEllipse,PolarEllipse,Hyperbola3,PolarCircle
Esoteric=ThreePointClosedCurve, Lissajous, Cardioid, Petals, Cardiod, Epicycloid, \
 Bizarre1
Numeric=Steps,Sawtooth, Noise, Triangular, Cogwheel, Zeta, Gamma, Bessel, Lambda
Scientific=Exponential, Decay, DampedOscillation, Resonance,ResonantFrequency,\
 LogisticFunction,FourierSum,BellCurve,ErrorFunction, Boltzmann, Gompertz,\
 CauchyDistribution, Biphasic, Gabor

#Graph definitions
Linear		 	= y=a*x+b 			//Simple straight line. a is the gradient (rate at which y changes for a given \
 change in x), b is the intercept - the height where the line crosses the y-axis.  
Parabola 	 	= y=x^2+a*x-b 		//Parabolic curve, given by a quadratic (an expression involving x^2). \
 There can be two 'solutions' where the curve intersects the X-axis.
Cubic		 	= y=x^3+a*x^2-x-b	//Cubic curve (involving x^3), with up to 3 solutions and 2 stationary points.
Quartic 	 	= y=x^4+a*x^3-b*x^2-c*x+d  // Quartic curve (involving x^4), with up to 4 solutions and 3 stationary points.
Hyperbola1 		= y=1/x				// Basic form of a 'rectangular' hyperbola (the arms are at 90 degrees) at the origin
Hyperbola2	 	= y=(x-a)/(x-b)		// Rectangular hyperbola shifted or scaled. Change a and b first.
Hyperbola3		= y=sqrt(a*x^2+b*x+c) //Rectangular hyperbola at 45 degrees to the axes.\
 Top half only: add in -sqrt for the bottom!

Sine		 	= y=a*sin(b*x+c)	//Sine wave. a is the amplitude, b is the angular speed (which determines \
 the frequency), and c is the phase. When c is PI/2, then you get a*cos(b*x).
Tangent		 	= y=tan(x)			//Basic tangent, the ratio of vertical height to horizontal distance\
 as you go around a circle. (x is angle round the circle).
InverseSine		= y=asin(x)  		//inverse sine is equivalent to x=sin(y) 
InverseCosine  	= y=acos(x)			//inverse cosine: Take the perpendicular projection of a line onto an axis.\
 If x is the ratio of the projected length to the line's length, then this gives the 'angle' of the line with the axis.
InverseTangent	= y=atan(x)
HyperbolicSine	= y=sinh(x) // equals (E^x - E^(-x))/2 : Note that hyperbolics obey the rule\
 cosh(x)+sinh(x)=exp(x), whereas standard trig functions obey cos(x)+i*sin(x)=exp(i*x).
HyperbolicCosine= y=cosh(x) // equals (E^x + E^(-x))/2
HyperbolicTangent=y=tanh(x) // equals sinh/cosh
InverseHyperbolicSine= y=asinh(x) // Equals log(x+sqrt(x^2+1))
InverseHyperbolicCosine= y=acosh(x) // Equals log(x+sqrt(x^2-1))
InverseHyperbolicTangent= y=atanh(x) // Equals log((1+x)/(1-x))/2
SumOfSines		= y=sin(x)+a*sin(b*x+c)	//Sum of two sine waves. a is the relative amplitude, \
 b controls relative frequency, c is the phase difference.  
ProductOfSines	= y=sin(x)*sin(a*x+b)		//Product of two sine waves. a is the relative frequency,\
 b is the phase difference.
SineCompressed 	= y=a*sin(b/x)		//Sine of the inverse of x. As you can see, this variable\
 has an undefined value between 0 and 1 when x approaches zero.
FourierSum      = y=sin(x)+a*sin(2*x)+b*sin(3*x)+c*sin(4*x)+d*sin(5*x)+e*sin(6*x) // A sum of the first \
 6 sine wave harmonics: alter the coefficients 'a' to 'e' to give different wave shapes 

HorizontalParabola= y=sqrt(x)				//Half a parabola about the x-axis. Add in -sqrt for the lower half! 
CircularArc		= y=sqrt(a^2-x^2)			//Semicircle - positive half. Use -sqrt for the other half!
ParametricCircle= x=sin(t);y=cos(t)			//Circle using parametric (trigonometric) coordinates. t represents the angle.
PolarCircle		= r=1						//In polar coordinates, the circle is just a constant radius.
PolarEllipse	= r=1/(a+b*cos(t+c))		//Conic sections using polar coordinates:\
 The main focus is at the origin. If a>b, we have an ellipse, and a is related\
 to the inverse of radius, and b is the eccentricity. As b approaches zero, we get \
 a circle. If a=b we have a parabola; if a<b we have a hyperbola. a=0 gives a straight \
 line with closest distance b from the origin.
ParametricEllipse = x=a*sin(t)+b*cos(t);y=c*cos(t); // General parametric equation for \
 ellipse. Think of it as a linear (matrix) transformation of a circle. 

ThreePointClosedCurve= x=1/(a+b*cos(t+c));y=cos(t);//Try reducing the value of b, or\
 changing valus of c.
Lissajous		= x=sin(a*t);y=cos((a+1)*t)//Lissajous figures: Try this with a=5, 6, 7 and so on! 
Cardioid        = r=1+cos(t) // this is an epicycloid made with two identical-sized circles.
Epicycloid      = x=a*cos(t)-b*cos(c*t);y=a*sin(t)-b*sin(c*t) //these patterns are made by moving a rotating circle \
 around the edge of another circle fixed at the origin. If you use higher values of c, you get more intricate patterns - try c=5.
Petals          = r=a+cos(b*t+c) //the radius varies sinusoidally with the angle t. b controls the number of petals - try b=5.

Exponential     = y=exp(x) //Basic exponential curve. The gradient (rate of change) is always equal to the function's value.
Decay           = y=a*exp(-x/b) //Exponential decay, where rate of decay depends on the function's value. \
 When x is zero, the starting value is a. b is known as the time constant.
DampedOscillation=y=cos(a*x)*exp(-x/b) //This is the solution to a second order differential equation \
 with damping. The exponential factor (time constant b) controls the decay, whereas a controls the frequency.
Resonance       = y=x*sin(a*x) // This is the solution to a second order differential equation with a driving force \
 at the resonant frequency
ResonantFrequency=y=1/sqrt(a+(b-x^2)^2/x^2) // This curve gives the gain of a damped resonant system \
 to sine waves of different frequencies. x is the frequency, and y is the gain. 'b' determines the resonant \
 frequency, and 'a' determines the sensitivity to frequency. 
LogisticFunction= y=a/(1+exp(-x/b)) //This sigmoid pattern of behaviour is commonly seen in biological systems, \
 where a system behaves linearly in within a certain range, but saturates at extreme values.
BellCurve       = y=a*exp(-x^2/b) //This is the shape of normal distribution function, b controls the width, and \
 is called the variance - its square root is called the standard deviation. For the area under the curve to be \
 1, a=1/(sqrt(2*PI*b)).
ErrorFunction   = y=erf(x) //integral of the normal distribution function, giving a cumulative probability.
Boltzmann       = y=a*x^2*exp(-x^2/b) //The boltzmann distribution describes the velocity distribution of\
 particles in a gas, where the constants depend on temperature and particle mass.
Gompertz        = y=a*exp(-b*exp(-c*x)) // Solution to a type of population growth problem
CauchyDistribution = y=1/(1+((x-a)^2/b)) // This distribution function is also known as the Lorentz distribution

Steps           = y=floor(a*x) // a 'step' function that gives only integer values. It works by truncating
 digits after the decimal point.
Sawtooth        = y=a*x-floor(b*x) // a sawtooth function, that uses 'floor' to create a repetitive pattern
Noise           = y=random() // Noise uses a random number generator to produce values between 0 and 1.
Triangular      = y=abs(2*b*x-2*floor(b*x)-a) //When a=1, gives a triangular wave, b controls the frequency. \
 different values of 'a' shift the parts of the curve around.
Cogwheel        = r=abs(2*b*x-2*floor(b*x)-a) //made using a sawtooth function as the radius

Biphasic        = y=b*(x-a)*exp(-c*(x-a)^2) // This is the differential (gradient) of a Gaussian \
 distribution function. The area above and below the axis are equal.
Gabor           = y=a*sin(c*x+d)*exp(-b*x^2) // This is a product of a sine wave and a Gaussian. The \
 shape is used by the brain and in image software as an edge detector.
 
Gamma			= y=gamma(x) // This is a continuous version of the factorial function, given by \
 the integral from 0 to +infinity of ( t^(z-1) e^-t ) with respect to t.
Bessel          = y=bessel(a,x) // The solution to the second order differential equation: t^2 D^2(y)\
 + t D(y) + (t^2-a^2) y = 0. 
Lambda			= y=x^(x^(b-1)) // A power of a power of x; equivalent to (((x^x)^x)^x)...  repeated \
 b times; i.e. b iterated exponentiations of x.
 
Bizarre1		= 0=sin(x)-sin(y-a)-floor(y+b)-b // An unusual implicit function. a and b cause significant \
 changes in the shape of the curve. Can you see why it has sharp points?
 