09-30-2014 06:47 AM - edited 09-30-2014 07:03 AM
Hello,
I would like to be able to plot a series of complex numbers as arrows along an axis in "3D".
Much like this image attached.
Ive been able to use 3D plots to draw the tips only of the vectors(complex numbers) in 3D space, but i'ld rather have them like arrows, rotating according to phase...as in the attached picture.
Could someone suggest the best approach ? Examples ?
To use existing 3D plots, or draw arraows in a picture, then convert it to "3D" perspective ?
It would also be helpful to be able to move it about in 3D...so as to inspect certain parts.
Any help would be appreciated.
Thanks.
09-30-2014 08:22 AM - edited 09-30-2014 08:22 AM
Ive taken a look at the Quiver plot example and tried to break it down to suit my purpose.
However I dont understand the inputs to the Plot Helper.
Can someone explain these..as I cant see the relation between the inputs I've randomly created as constants and the quivers drawn.
Ive attached my experiment (LV2012)
Thanks.
10-10-2014 12:32 AM
Hi,
To put this question more simply...in the hope of getting a reply..
Could someone explain how to use a 3D quiver plot to draw 3 arrows from say:
(0,0,0) to (1,1,0)
(0,0,1) to (2,2,1)
(0,0,2) to (-3,3,2)
This would be 3 arrows, from a common baseline, the z axis, and pointing upward at various angles.
I can then extend this example to suit my application relating to multiple complex numbers.
Thanks for any suggestions.
10-10-2014 03:19 PM
Hello Carloman,
I would suggest taking a look at the following link:
3D Quiver Plot Helper VI
http://zone.ni.com/reference/en-XX/help/371361H-01/lvpict/3d_quiver_plot_vi/
Best wishes!
03-17-2022 12:49 PM
The quiver plot example is useless. Since the source of the data is not explained, I have no idea how this vi works. NI has had questions like this for years about the quiver plot, and no one answers the questions other than to say look at an example that is not helpful. Someone needs to add text to the example to explain how to format the XYZ data into matrices or 2D arrays.
03-18-2022 03:23 PM - edited 03-18-2022 03:26 PM
The example is indeed pretty terrible. I'd recommend starting with a bunch of empty grids and playing around with sample data to see what changes.
The Vector mode plot uses a 2D array for the Z height of the surface. If X and Y are empty, then it assumes 0, 1, 2, etc. Otherwise, X and Y describe the X and Y coordinates of z(x,y).
The Nx, Ny, and Nz inputs contain the x, y, and z sizes of the arrows in the Z grid. In other words, Nx(x,y) is the x length of the arrow pointing to z(x,y). Unfortunately it looks like their lengths are statically determined, which seems silly to me but who knows. As best as I can tell the arrows use the unit vectors described by Nx, Ny, and Nz, not the actual values themselves. Again this seems dumb (you generally want to see the length of the vectors on this type of plot) so I don't know if I'm just missing something or what.
Right click on it and select "3d plot properties" for a lot more properties that will, for example, let you turn the surface off to just get vectors.
Edit: The matrix version has a similar 2D grid for X and Y. X(i, j) corresponds to the x location of the point at z(i, j). The vector version assumes that all x values are the same for a given row, whereas the matrix version assumes that each point is different. Bit of an odd way to look at things but I suppose it makes sense.
What it does look like though is that the quiver plot doesn't do what the OP wants it to, unless all arrows happen to be the same length.
I'd try the Advanced Plotting Toolkit. I don't think it's actively supported though so it might not be super easy to use.
03-19-2022 05:06 PM - edited 03-19-2022 05:09 PM
The Advanced Plotting Toolkit is actually a very nice API wrapped around (a pre-2015) Python and the Matplot Package.
So, you might as well just learn how to render a 3d Quiver Plot (or 3d vector field...) directly e.g. start with
https://matplotlib.org/stable/gallery/mplot3d/quiver3d.html
assuming you want to render something as the original OP discribed in the first message