LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Quiver Plot using 1D X-Y-Z Data arrays

Scatter Plot shows the expected pattern of data point positions. Not sure what math needs to be done to plot the correct X-Y-Z positions in a quiver plot. Also not sure how to plot the quiver plot arrows using single axis data for x-y-z data. Maybe this can't be done??? What I expected to happen was an arrow at the data point at the x-y-z position it was taken and then the arrow pointing in a direction dictated by (field x-y-z data).

0 Kudos
Message 1 of 9
(6,761 Views)

Your code makes little sense.

 

Why would you need to index out the same data 3x in parallel (upper left)? Are you aware that "index array" is re-sizeable? You only need exactly one instance? Can you describe how the "field" is defined and what the units are? How should the graph look like?

0 Kudos
Message 2 of 9
(6,731 Views)

I forgot index array was resizable.-Thanks  The data is a measurement of magnetic field at different location in a circular pattern. The location of these measurement is index array 1,2,3(x,y,z). The magnetic field measurements are array index 4,5,6 (field-x,field-y,field-z).  I assumed I could make something that looked like this. 

 

0 Kudos
Message 3 of 9
(6,693 Views)

I forgot about the index array was resizable.-Thanks My data is magnetic field measurement taken at different locations in a circular pattern (shown in the scatter plot). These locations are array index (1,2,3 x,y,z). Then there is the magnetic field measurement taken at each of those locations. These measurements are array index (4,5,6 x-field,y-field,z-field). I figured I could make a plot that looked like this.

 

https://www.researchgate.net/figure/Three-dimensional-vector-stream-plot-for-the-magnetic-field-in-C...

 

 

0 Kudos
Message 4 of 9
(6,694 Views)

Is there not enough information? Or is this not possible with labview. FYI- I figured the plot would be the standard labview quiver arrows. 

0 Kudos
Message 5 of 9
(6,653 Views)

Sorry, I am currently traveling with little computer access. I can try maybe in a few days. would have thought somebody else would answer by now.... 😉

0 Kudos
Message 6 of 9
(6,631 Views)

Thank you, I figured it was going to be a topic that would never get solved. Enjoy your travels and I will await any help you can give.

0 Kudos
Message 7 of 9
(6,618 Views)

@knows-just-enough wrote:

Thank you, I figured it was going to be a topic that would never get solved. Enjoy your travels and I will await any help you can give.


are you sure you haven't mixed up x and z position in your data array?

I assume index 1 white is meant to be z not x ?

data_question.png

 

 

on thing I am pretty sure about your code is, that the following won't work to interpolate a 1d array to a 2d array:

2d_interpolation.PNG

the above will transform your 1d array to a 2d array with one row.

according to

http://zone.ni.com/reference/en-XX/help/371361R-01/lvpict/3d_quiver_plot_vi/

z matrix is a 2D array that specifies the z-coordinates that graph the plot. If you do not wire the other inputs, LabVIEW graphs the number of elements for the x-axis based on the number of rows in z matrix and the number of elements for the y-axis based on the number of columns in z matrix.

 

... you probably want to do something like this:

"...\National Instruments\LabVIEW 2019\examples\Mathematics\Interpolation\Scattered 2D Interpolation.vi"

 

 

 

0 Kudos
Message 8 of 9
(6,592 Views)

OK, glanced at this for a few seconds and the help seems quite confusing. For example the image for the "matrix" version is incorrect. It is also not obvious what e.g. (a 2D array that specifies the length of the vector z (or x or y) vector in relation to the z-plane) actually means. The shipping example is just a bunch of array diagram constants wired to the helper.

 

This VI graphs "normal vectors" to a plane, while you want a 3D vector field without any plane. So this would seem to required a bit of math. Also, you can only define a global color for the arrows. Weird is that for some quiver colors the arrows differ in color between head and tail (try green or blue) while for other colors they are the same (try red or black).

 

It might be easier to create a 3D picture instead, e.g by placing cones of desired colors in desired locations.

 

quiverhelpWrong.png

0 Kudos
Message 9 of 9
(6,573 Views)