12-07-2009 01:55 AM
Total newbie question... I just have a simple set of (x,y,z) coordinates that I want to plot in 3D, in realtime as they're collected one-y-one... what's the best way to do this?
For example, I've got these values, as (x,y,z):
0.000, 0.000, -5.072
10.000, 0.000, -4.774
10.000, 10.000, -4.583
0.000, 10.000, -4.423
My program steps through a For Loop and generates one point during each run through the loop, i.e., at N = 0, it gets (0.000, 0.000, -5.072), at N = 1 it gets (10.000, 0.000, -4.774), and so on.
I've looked through the help and example files but I got confused, all this talk about 1D vectors and 2D matrices... all I've got are some simple (x,y,z) coordinates. My guess is that I need to somehow get the X values into a 1D X vector, same for Y, and for the Z a (in this case) 2x2 2D array, but I get confused about how to actually do that, and to get the plot to update point-by-point as it's getting built up...
12-07-2009 07:53 AM
A cut-n-paste from reply in this thread
Starting atpost #7 of this thread I start a tutorial exaplaining how to use the 3d Graph to plot multiple curves and surfaces.
If you want your final image to look like an air foil your are going to have to present your data such that adjoining points in your surface are adjacent in the data set. THis thread shows a quick hack of a a car rendered in 3d.
If you want it all to be one color you will have to set teh color mapping to none.
Idividual ribs of the wing can be added as sepearte plots to over-lay the surface.
Have fun!
Ben
I suggest you play with that car example first to develop a model in your head about what the graph wants. Once you figure that out, you could start a NEW thread on how to manipulate your data if you have trouble wit that part.
have fun,
Ben
12-07-2009 02:04 PM
12-07-2009 02:10 PM
Like I posted, that is step 1.
Start another thread (the subject is different and you want as many as possible to see your Q) to learn how to build your array.
Ben
12-07-2009 02:44 PM
sweet, figured out the arraying bit by just running some wires out and having LabVIEW auto-index them through a mix of Auto-Indexed Tunnels and Loop Tunnels, see attached image below... (excuse what I'm sure is horribly sloppy coding )
the difficulty I'm having now is that it only updates once all the loops are finished, i.e., it doesn't update "realtime" as the data is gathered point-by-point. Is there a simple fix for this using the kind of wiring I have now?
12-08-2009 10:58 AM
12-08-2009 03:59 PM
Hi Justin, the reason is that in the final version of the program, each point will take a long time to acquire... say, 1 minute. Building up a 10x10 image or larger would then take, experimentally, over an hour. Having a "realtime" preview of the data would allow the experimenter to see if something's wrong (and thus cancel the run and fix whatever's wrong) instead of waiting an hour or more for the final data, and then having to redo the experiment.
12-08-2009 04:25 PM - edited 12-08-2009 04:26 PM
12-08-2009 04:39 PM - edited 12-08-2009 04:41 PM
Quick example.
12-09-2009 07:21 AM
Init the arrays with "NaN" instead of "0" so those points don't plot.
Ben