Example Code

3D Plot with Pseudo 4th Dimension as Intensity

Code and Documents

Attachment

This VI uses the 3D surface graph to plot sets of X, Y and Z data with a 4th dimension represented by intensity. The VI generates X, Y, and Z data arrays representing sampled (X,Y,Z) data points of several quadric surfaces. It graphs them using the Plot3dMesh method of the 3D graph. The VI then uses the inverse of the Z array as the intensity array (the W Vector of the 3D mesh). The VI also demonstrates some of the lesser known functionality of the graph, such as color, that you can use programmatically with Invoke and Property Nodes.
You can change the X, Y, and Z input arrays to the plot to represent any 3D surface that can be represented by a function f(x,y,z). The fourth input, W, is the intensity array.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors