3D Surface Plotter  1.0.0
Create 3D Surface Charts for Any Math Function
Surface3DLib.MathFunc Class Reference

A static class MathFunc. More...

Static Public Member Functions

static Vector3 GetMathFunction (MathFunctionEnum enumFunc, float x, float z, List< float > parameters=null)
 Get a built-in math function. More...
 
static Vector3 Sinc (float x, float z)
 This method produces a Vector3 point on a 3D Sinc surface described by the Sinc function. More...
 
static void SincAnimation (float speed)
 This method is used to animate the sinc function. More...
 
static Vector3 Peaks (float x, float z)
 This method produces a Vector3 point on a 3D Peaks surface described by the Peaks function. More...
 
static void PeaksAnimation (float speed)
 This method is used to animate the peaks function. More...
 
static Vector3 ExpFunc (float x, float z)
 This method produces a Vector3 point on a 3D exponential surface described by the function. More...
 
static void ExpFuncAnimation (float speed)
 This method is used to animate the exp function. More...
 
static Vector3 SinCos (float x, float z)
 this method produces a Vector3 point on a 3D sine-cosine surface described by the function. More...
 
static void SinCosAnimation (float speed)
 this method is used to animate the sine-cosine function. More...
 

Detailed Description

A static class MathFunc.

It contains methods to define several built-in math functions used to create 3D surfaces. It also implements several animation methods that allow the user to animate the corresponding math functions.

Member Function Documentation

◆ ExpFunc()

static Vector3 Surface3DLib.MathFunc.ExpFunc ( float  x,
float  z 
)
static

This method produces a Vector3 point on a 3D exponential surface described by the function.

y = exp(cos(a*r)), where r = sqrt(x^2 + z^2) and a is parameter.

Parameters
xinput variable x.
zinput variable y.
Returns
a Vector3 point.

◆ ExpFuncAnimation()

static void Surface3DLib.MathFunc.ExpFuncAnimation ( float  speed)
static

This method is used to animate the exp function.

It uses the simulation speed as its input.

Parameters
speedanimation speed.
Returns
a Vector3 point.

◆ GetMathFunction()

static Vector3 Surface3DLib.MathFunc.GetMathFunction ( MathFunctionEnum  enumFunc,
float  x,
float  z,
List< float >  parameters = null 
)
static

Get a built-in math function.

It can be specified using MathFunctionEnum.

Parameters
enumFuncEnumeration used to specify a built-in math function.
xInput variable x.
zInput variable z.
parametersOptional parameters of type a float list.
Returns
A Vector3 point for the selected function.

◆ Peaks()

static Vector3 Surface3DLib.MathFunc.Peaks ( float  x,
float  z 
)
static

This method produces a Vector3 point on a 3D Peaks surface described by the Peaks function.

y = 3*(1-x)^2*exp(-a*(x^2) - a*(z+1)^2) - 10*(x/5 - x^3 - z^5)*exp(-b*x^2-b*z^2) - 1/3*exp(-c*(x+1)^2 - c*z^2). this function uses three parameters a > 0, b > 0, and c > 0.

Parameters
xinput variable x.
zinput variable y.
Returns
a Vector3 point.

◆ PeaksAnimation()

static void Surface3DLib.MathFunc.PeaksAnimation ( float  speed)
static

This method is used to animate the peaks function.

It uses the simulation speed as its input.

Parameters
speedanimation speed.
Returns
a Vector3 point.

◆ Sinc()

static Vector3 Surface3DLib.MathFunc.Sinc ( float  x,
float  z 
)
static

This method produces a Vector3 point on a 3D Sinc surface described by the Sinc function.

y = sin(r)/r, where r = a * sqrt(x^2 + z^2). Here a is a parameter.

Parameters
xinput variable x.
zinput variable y.
Returns
a Vector3 point.

◆ SincAnimation()

static void Surface3DLib.MathFunc.SincAnimation ( float  speed)
static

This method is used to animate the sinc function.

It uses the simulation speed as its input.

Parameters
speedanimation speed.
Returns
a Vector3 point.

◆ SinCos()

static Vector3 Surface3DLib.MathFunc.SinCos ( float  x,
float  z 
)
static

this method produces a Vector3 point on a 3D sine-cosine surface described by the function.

y = a*sin(c*x) + b*cos(c*z), where a, b, and c are parameters with default a = 1 and b = 1, and c = 1.

Parameters
xinput variable x.
zinput variable y.
Returns
a Vector3 point.

◆ SinCosAnimation()

static void Surface3DLib.MathFunc.SinCosAnimation ( float  speed)
static

this method is used to animate the sine-cosine function.

It uses the simulation speed as its input.

Parameters
speedanimation speed.
Returns
a Vector3 point.