Three-dimensional plotting

Equations (3.4) and (3.5) define two mathematical functions that are more complicated to visualize and plot compared to the simple polynomials in the previous section. Equation (3.4) is a scalar function that depends on two variables. The graph of such a function can be visualized via a surface plot. Equation (3.5) is a vector valued function and can be plotted as a parametric curve in a three-dimensional space. In this section, we shall see how to do this.

Surface plot

Let us start by making a surface plot of the graph of Equation (3.4) in the interval x ∈ [–2; 2] and y ∈ [–2; 2]. Since we work with discrete points,we need to evaluate the range of f for all different combinations (x1y1), (x2y1),...(xnyn). To do this in ...

Get GNU Octave now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.