Plot3DSimpleSurface Method

3D Graph Control

Plot3DSimpleSurface Method

Syntax

CWGraph3D.Plot3DSimpleSurface zMatrix [, wMatrix]

Purpose

Plots one (or two) 2D array(s) of data as a surface.

Remarks

The array provides the Z data for the surface while the indices provide the X and Y data. The optional second array is used to specify magnitude data.

Plot3DSimpleSurface uses the first available plot from the CWGraph3D.Plots collection that is marked as a multiplot. If there is not a plot available, it adds a new plot with MultiPlot set to True.

Parameters

zMatrix As Variant

2D array of Z data.

wMatrix As Variant

[Optional] 2D array of magnitude data.

Example

'Generate data to plot
    Const n = 20#
    Dim x(n), y(n), z(n, n)
    For i = 0 To n
        x(i) = (i / n - 0.5) * 8
        y(i) = (i / n - 0.5) * 8
    Next i
    For i = 0 To n
        For j = 0 To n
            z(i, j) = 8 * Exp(-(x(i) ^ 2 + y(j) ^ 2) / 4)
        Next j
    Next i
'Plot the data on each graph
   CWGraph3D1.Plot3DSimpleSurface z

See Also

CWPlot3D.MultiPlot

CWPlot3D.Plot3DSimpleSurface

Plot3DCurve

Plot3DSurface

Plot3DParametricSurface

Plot3DMesh

Three-Dimensional Plots (concept)

Plot Styles Example