Back to the table of contents

Construction of 2D and 3D plots

3.1 Plotting functions

Mathpar table allows you to build graphics ($tablePlot$), graphs of functions, which are explicitly defined ($plot$) or parametric ($paramPlot$). You can build several different graphs in one coordinate system ($showPlots$).

Setting charting given command set2D(). If the command set2D() has no parameters, the boundaries for the graphs are calculated automatically, and for explicit functions selected interval $[0,1]$ along the horizontal axis. The names of the coordinate axes will be $X$ and $Y$, respectively. Title in the schedule will be absent.

If the command set2D() user not asked, it is automatically set set2D() with no arguments at the beginning of the session the user.

There are 7 basic options of this command with the following parameters: 1) set2D() 2) set2D(x0, x1); 3) set2D(x0, x1, 'title'); 4) set2D(x0, x1, y0, y1); 5) set2D(x0, x1, y0, y1, 'title'); 6) set2D(x0, x1, 'title', 'nameOX', 'nameOY'); 7) set2D(x0, x1, y0, y1, 'title', 'nameOX', 'nameOY').

Numbers $x0$ and $x1$ $(x0<x1)$ sets the interval along the axis of $OX$. Numbers $y0$ and $y1$ $(x0<x1)$ sets the interval along the axis of $OY$. If these parameters are not specified, are calculated automatically. $nameOX$ — signature on the axis $OX$, $nameOY$ — signature on the axis $OY$, $title$ — header graphics.

In addition, permitted to ask one or two keys that should be the last in the list of options: $BW$ and $ES$. $BW$ refers to the construction of Cheraw and white graphics. $ES$ indicates equality zoom scale $x$ axis ranges from $y$. A total of $7*4=28$ different ways to set the parameters environment.

Character line which is depicted in the graph of each of the functions $(plot, tablePlot, paramPlot)$ can be different: the solid line, dotted line, and the line that ends with an arrow. To do this, these options are: '$dash$' (dotted line), '$arrow$' (arrows) and a combination of '$dashAndArrow$', which should be at the end of the parameter list of these functions.

For example, plot( x^2+1, 'dash').

If several separate graphs have names such as P=plot(x^2); Q=tablePlot([[1,2], [3,4]]); in this case they may be represented along with the command showPlots([P, Q]).

The resulting plot can be downloaded from the site. To do this, click on the button $\small \fbox{Download}$, which is located below the graph. The file is on schedule to be downloaded to your computer.

Plots of explicit functions

To obtain the plot of an explicit function $f=f(x)$ the command plot(f). Other options commands: 1) plot(f, [x0, x1]), where $[x0, x1]$ — interval along the axis of $OX$; 2) plot(f, [x0, x1], 'options'), where $[x0, x1]$ — interval along the axis of $OX$, 'options' — takes the following values: 1)'dash' — schedule will be a dashed line;\ 2)'arrow' — the last point on the graph is drawn with an arrow; 3)'dashAndArrow' — schedule will be a dashed line and the last point of the graph is drawn with an arrow. 3) plot(f, 'options'). You can plot functions with parametric variables. The parametric variables are assigned when you set a environment (see ex.3).

No result yet

No result yet

No result yet

No result yet

No result yet

No result yet

No result yet

No result yet

Plots of parametric functions

To obtain the plot of parametric function {$f=x(t)$, $g=y(t)$} the command paramPlot([f, g], [t0, t1]) is used, where $[t0, t1]$ is an interval of variation of $t$. Another version of the command: paramPlot([f, g], [t0, t1], 'options'), where $[t0, t1]$ — the range of values for the parameter change, 'options' — the following values: 1)'dash' — schedule will be a dashed line;\ 2)'arrow' — the last point on the graph is drawn with an arrow; 3)'dashAndArrow' — schedule will be a dashed line and the last point of the graph is drawn with an arrow.

No result yet
No result yet
No result yet
No result yet

No result yet

No result yet
No result yet
No result yet

Plot of table function

To plot a function, which is defined by the table of points you have to execute the command: tablePlot([[x_{1,…, x_{n}],[y_{11},…,a_{1n}],…,[y_{k1},…,a_{kn}]])}. Another version of the command: tablePlot([[x_{1,…, x_{n}],[y_{11},…,a_{1n}],…,[y_{k1},…,a_{kn}]], 'options')} ,where 'options' — the following values: 1)'dash' — schedule will be a dashed line;\ 2)'arrow' — the last point on the graph is drawn with an arrow; 3)'dashAndArrow' — schedule will be a dashed line and the last point of the graph is drawn with an arrow.

No result yet

No result yet

No result yet

No result yet

No result yet

No result yet

Functions that are defined on the points table of values

Plotting functions on the points given by the tabulated values use the command: pointsPlot([[x_{1,…, x_{n}],[y_{1},…,y_{n}]], [s_{1},…,s_{n}], [kv_{1},…,kv_{n}], [kg_{1},…,kg_{n}])}, where $s_{n}$ — signature points, $kv_{n}$ — rate of rotation about the point (ranges from 0 to 7, and signifies a shift in the ($kv_{n}$ * 45) degrees), $kg_{n}$ — shift factor along the axis $OX$ (if it is negative then the displacement is to the left). The reduced variants of this command: pointsPlot([[x_{1,…, x_{n}],[y_{1},…,y_{n}]], [s_{1},…,s_{n}])} or pointsPlot([[x_{1,…, x_{n}],[y_{1},…,y_{n}]], [s_{1},…,s_{n}], [kv_{1},…,kv_{n}])} or pointsPlot([[x_{1,…, x_{n}],[y_{1},…,y_{n}]], [s_{1},…,s_{n}], [kv_{1},…,kv_{n}], [kg_{1},…,kg_{n}])}

No result yet

No result yet

No result yet

No result yet

No result yet

No result yet

Construction of various plots of functions in one coordinate system

To construct the plots of functions defined in different ways, you must first build a plot of each function and then execute the command showPlots([f_1, f_2, …, f_n]).

Another version of the command: showPlots([f1, f2, f3, f4], 'noAxes'), where 'noAxes' — parameter indicating image graphics without axes. or showPlots([f1, f2, f3, f4], 'lattice'), where 'lattice' — parameter indicating the image graph with the lattice.

No result yet

No result yet

No result yet

Construction of graphs

To construct the graph, use the command plotGraph([[a_{11,…,a_{1n}],…,[a_{n1},…,a_{nn}]], [[x_{1},…, x_{n}],[y_{1},…,y_{n}]])}, where $[[a_{11},…,a_{1n}],…,[a_{n1},…,a_{nn}]]$ — adjacency matrix, $[[x_{1},…, x_{n}],[y_{1},…,y_{n}]]$ — matrix of coordinates.

No result yet

In addition, you can run only with the first parameter plotGraph([[a_{11,…,a_{1n}],…,[a_{n1},…,a_{nn}]])}, where $[[a_{11},…,a_{1n}],…,[a_{n1},…,a_{nn}]]$ — adjacency matrix.

No result yet

You need to run a single numeric parameter plotGraph(N), where $N$ — the number of vertices in a graph.

No result yet

3.2 Plots 3D of explicit functions

You can build 3D graphs of the functions that are defined explicitly. To obtain the plot 3D of an explicit function $f=f(x,y)$ the command plot3d(f, [x0, x1, y0, y1]), is used, where $[x0, x1]$ is an interval on the axis $OX$, $[y0, y1]$ is an interval on the axis $OY$.

The obtained plot can be rotated and to increase or decrease.

Moving the mouse holding down the left <<mouse>> button causes the rotation of the coordinate system of schedule. After stopping the movement of the <<mouse>> graphics are redrawn in the new rotated coordinate system. Moving the mouse holding down the left mouse button while pressing $ Shift$ button leads to a change in image scale. After stopping the movement of the <<mouse>> graphics are redrawn in the new scale.

No result yet

No result yet

No result yet

Sphere

No result yet

Thor

No result yet

Spiral

No result yet

Logarithmic spiral

No result yet

"Seashell"

No result yet

Shamrock

No result yet

Dini surface

No result yet

Tape Mobius

No result yet

Cube

No result yet

Cylinder

No result yet

Cone

No result yet

Truncated cone

No result yet

Hourglass

No result yet

3.3 Ploting of 3D graphs of functions that are defined implicitly

You can build 3D graphs of the functions that are defined implicitly. To construct the graph of an implicit function $ f(x,y,z)=0$ use the command

implicitPlot3d(f, x0, x1, y0, y1,z0, z1),

where the numbers $xMin, xMax, yMin, yMax, zMin, zMax$ set the box in the space, which is represented by an implicit function.

You can specify only one function, like this

implicitPlot3d(f)

in this case it is assumed that there will be shows the function $ f $ in the cube $ 20\times 20 \times 20$, which is placed on a center origin.

You can rotate the coordinate system by moving the mouse pointer while holding down the left button. You can move the coordinate system by moving the mouse pointer while holding down the right button.

It is possible, optionally, to specify the coordinates of the light source, the color of the surface and the grid size. The default grid of 50 points on each edge of the box.

The color format $RGB$ (red, green, blue) is given a number

$R * 256 * 256+ G *256 + B$,

where each letter denotes a non-negative integer not exceeding 255. For example, $ 255 * 256 * 256 $ — red, and $ 255 * 256 * 256 + 255 * $ 256 — yellow (red + green).

Allowed, in addition, the following sets of arguments:

$(F, xMin, xMax, yMin, yMax, zMin, zMax, gridSize)$,

$(F, xMin, xMax, yMin, yMax, zMin, zMax, lightX, lightY, lightZ, gridSize)$,

$(F, xMin, xMax, yMin, yMax, zMin, zMax, lightX, lightY, lightZ, color, gridSize)$.

No result yet

Hyperboloid

No result yet

Red sphere.

No result yet

Yellow surface with a central symmetry.

No result yet

Organ pipes. Back to the table of contents