LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (9/24/2009) - 3D Surface Plot

3D Graphs certainly have a bit of a learning curve to them, but much less than say the 3D Picture Control.  Today we'll play with perhaps the easiest of the 3D graphs, the 3D Surface Plot.  Drop this control on your FP and as usual LV will drop a helper VI on the BD for you.  All you need to do for this Graph is provide a 2D array of z-values.  If your points aren't evenly space or you want the x and y values to make sense you can add x and y arrays which specify the points you sample in x and y.  Pretty simple, just keep in mind that you are specifying a grid in X and Y.

 

I have attached a simple example (in LV 8.6) which plots Jv(r)*cos(m*theta) where Jv(r) is the Bessel function.  A lot of properties to play with, I still haven't tried to change them programmatically.  I am used to the LV8.2 variety where everything was done with control references.  The new way must be better, it's still new to me.  (Not helpful help in LV8.6).  Another thing I noticed is my usual NaN trick to make plots invisible throws the 3D graph for a loop.  I am often plotting over a cylindrical domain so I make points outside the desired radius equal to NaN.  It works, it is just really slow to render.  In this case, if r>xmax I just set r=rmax to I get a constant z outside the circle.

 

3DSurfaceGraph.png 

 

VIOTD groundrules here

Message Edited by Darin.K on 09-24-2009 09:51 AM
Message Edited by Darin.K on 09-24-2009 09:54 AM
Message 1 of 6
(4,335 Views)

Darin.K wrote:

3D Graphs certainly have a bit of a learning curve to them, but much less than say the 3D Picture Control.  

 ...  A lot of properties to play with, I still haven't tried to change them programmatically....


As I mentioned in this thread, use the 3d properties dialog box as a guide to how to do the same thing programatically. This image illustrates the idea.

 

 

 

 

Ask if you have Q's,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 6
(4,319 Views)
That looks like the method I am familiar with for the ActiveX based 3D plots, the new version seems to be using the 3D picture control.  Am I missing the simple connection?
0 Kudos
Message 3 of 6
(4,315 Views)

Sorry Darin , I thought you were talikng about the CW version.

 

Forget my last.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(4,304 Views)

It is still good information.  I may be sticking to that version anyway.

 

It does seem that the Property Node for the indicator gives me control of most of the properties I'd like. 

Message Edited by Darin.K on 09-24-2009 10:41 AM
0 Kudos
Message 5 of 6
(4,297 Views)
I haven't used the 2009 version, but the ActiveX CW version (in 8.5) is way better than the one implemented in 8.6.  I've used it extensively.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 6 of 6
(4,294 Views)