Functions > Graphing > CreateSpace and CreateMesh
CreateSpace and CreateMesh
CreateMesh(function, [s0, s1, t0, t1], [sgrid, tgrid], [fmap])—Returns a nested array of three matrices representing the x, y, and z-coordinates of a parametric surface defined by the function of two variables in the first argument. You can use this function to plot a surface in a contour plot or a 3D plot.
CreateSpace(function, [t0, t1], [tgrid], [fmap])—Returns a nested array of three vectors representing the x, y, and z-coordinates of a parametric space curve defined by the function of one variable in the first argument. You can use this function to plot a curve in a 3D plot.
Arguments
function is one of the following:
A real, parametric, vector-valued function specifying the three coordinates values, for example
For CreateMesh:
For CreateSpace:
Three real, parametric, scalar-valued functions, separated by commas in the argument list, for example
For CreateMesh:
f1(u, v):=u
f2(u, v) := v
f3(u, v) := sin(u) + cos(v)
For CreateSpace:
f1(t):=t
f2(t) := t2
f3(t) := sin(t)
For CreateMesh, you must define each function as a function of two variables, even if you use only one variable.
A real, scalar-valued function of x and y that specifies only the z-values, for example
G(x, y):=sin(x)+cos(y)
You cannot use this type of function with CreateSpace.
For the functions argument of CreateMesh and CreateSpace, you input only the function name, without the function arguments, for example CreateMesh(f1, f2, f3, 0,1,0,1). In this example, CreateMesh was used with three functions, in the range of (0,1) for both variables.
s0, s1 (optional) are the real lower and upper bounds of the range for the first independent variable, u or x. The default values are −5 and +5.
t0, t1 (optional) are the real lower and upper bounds of the range for the second independent variable, v or y. The default values are −5 and +5. If you specify s0, s1, you must also specify t0, t1.
sgrid, tgrid (optional) are the positive integer number of grid points in u and v. The default values are 20. The number of cells in the grid is (sgrid −1) × (tgrid −1).
fmap (optional) is a real, three-element, vector-valued function of three variables that defines a mapping from any coordinate system to Cartesian coordinates, for example
Was this helpful?