Code Documentation¶
-
class
interpolation.
Interpolation
(var, env='sympy')[source]¶ The
Interpolation
class provides polynomial interpolation routines in multi variate case.var is the list of symbolic variables and env is the the symbolic tool.
-
Delta
(idx=-1)[source]¶ Construct the matrix corresponding to idx’th point, if idx>0 Otherwise returns the discriminant.
-
Interpolate
(points, vals)[source]¶ Takes a list of points points and corresponding list of values vals and return the interpolant.
Since in multivariate case, there is a constraint on the number of points, it checks for the valididty of the input. In case of failure, describes the type of error occured according to the inputs.
-
-
class
graphics.
Graphics
(env='numeric', numpoints=50)[source]¶ This class tends to provide basic graphic tools based on matplotlib and mayavi.
Accepts one optional argument env which determines the types of the function to be visualized:
- numeric: is a numerical function (regular python functions)
- sympy: Sympy symbolic function
- sage: Sage symbolic function
-
ParamPlot2D
(funcs, rng, color='blue', legend='', thickness=1)[source]¶ Appends a parametric curve to the Graphics object. The parameters are as follows:
funcs
: the tupleof functions to be plotted,rng
: a triple of the form (t, a, b), where t is the funcs’s independents variable, over the range [a, b],color
: the color of the current curve,legend
: the text for the legend of the current crve.
-
Plot2D
(func, xrng, color='blue', legend='', thickness=1)[source]¶ Appends a curve to the Graphics object. The parameters are as follows:
- func: the function to be plotted,
- xrng: a triple of the form (x, a, b), where x is the func’s independents variable, over the range [a, b],
- color: the color of the current curve,
- legend: the text for the legend of the current crve.
-
Plot3D
(func, xrng, yrng)[source]¶ Sets a surface to the Graphics object. The parameters are as follows:
func
: the function to be plotted,xrng
: a triple of the form (x, a, b), where x is the first func`s independents variable, over the range `[a, b],yrng
: a triple of the form (y, c, d), where x is the second func’s independents variable, over the range [c, d].