Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

quiver 3d an and normal vector in .NET (NI) and Labview

hello!

I wonder about plot 3D vector in .net and labview. In .net it has function: Plot3DSurface in which we can choose options to plot NORMAL VECTOR. This is look like 3D QUIVER in Labview? Are they same function?

 

In my project, I want to plot 3d vector like this: (x,y,z) is a point has vector in x, y, z-axis are (u,v,w) => plot vector (u,v,w) at point (x,y,z) in 3D. This can be done using Matlab function (quiver3). However, when I read document about quiver 3D in labview and in .NET (Plot3DSurface with normal vector option), the functions in these program plot 3D normal vector. So, I confused that the 3D normal vector and 3D vector as I want to plot are the same or not?.

0 Kudos
Message 1 of 9
(9,452 Views)

Hello,

 

By default, the vectors are normalized in LabVIEW. If you want to disable this, you can first open <LabVIEW>\vi.lib\Math Plots\3D Math Plots\3D Quiver\Protected\Plot Object\Create Quiver.vi. Then, add a Disable Structure to the Normalize.vi and wire its input/output directly in the enable case.

 

Is this what you were asking? If it is not, what programming environment are you planning on using? Did you want the vectors normalized or not?

 

Regards,

 

Jason D

Applications Engineer

National Instruments

0 Kudos
Message 2 of 9
(9,433 Views)

Thank you for your reply! But maybe I explained my problem not clear so you don't understand. I give an wanted plot:

 

In my project, I want to plot a 3D vector field which is plotted by three components in 3-axes: (Vx, Vy, Vz) at equivalent point (x, y, z).

In the Labview, it has a 3D graph named Quiver. I read the its help file and know that this quiver can plot 3D vector field but the input is: Nx, Ny, Nz at equivalent (x, y, z). Here, Nx, Ny, Nz is a normal vector. So, I don't understand what's is normal vector? and what's different with Vx, Vy, Vz ?

 

For instance, we have a 3D surface, this surface is formed by (x, y, z) points. In mathematics, the normal vector of this surface at point (x, y, z) is (Nx, Ny, Nz). This is my understand about using Quiver. Is that right? But my problem is: at point (x, y,z) I have a vector (Vx, Vy, Vz) and I want to plot this vector. So I think the (Vx, Vy, Vz) and input of Quiver (Nx, Ny, Nz) are quite different! If my think is right, how could I plot (Vx, Vy, Vz)?

 

Thank you very much!

0 Kudos
Message 3 of 9
(9,426 Views)

I attach the files in Matlab and Labview. What I want is the figure like QuiverMatlab.tif which I plot in Matlab. But when I used Quiver in Labview, It become only 2D? I don't know what's wrong?

 

Thank you very much!

0 Kudos
Message 4 of 9
(9,421 Views)

And once more question. I test plot 4 vector using 3D quiver. However, there are an strange plot in X-Z and Y-Z plane as attached figure. I input Nx, Ny, Nz is ones matrix => in the mathematics, in X-Z, or Y-Z plane the vectors should form 45 degree with one axis. However, as seen in the figure, vector parallel with X and Y axes. I don't understand and don't know the reason why? Or the behavior of 3D quiver is different with normal undestanding of mathematics? If then, please guide me the detail what's is Nx, Ny, Nz, and x, y, z (inputs of 3D Quiver)?

 

Thank you !

0 Kudos
Message 5 of 9
(9,416 Views)

Hi,

 

The normal vector is a vector that is normal, or perpendicular, to the surface. The difference between this vector and your vector is that your vector could be at any angle from the surface. If you do not want to have the vectors normalized, you can disable the Normalize.vi as mentioned above.

 

In the attached example, I chose Bx_2.csv for Path 3, By_2.csv for Path 4, and Bz_2.csv for Path 5. When I ran the program, nothing was plotted. Was there other steps to get this properly working?

 

To learn more about the Quiver 3D plot, I suggest looking over the link below. It contains a large amount of helpful information!

 

Quiver Page: http://zone.ni.com/reference/en-XX/help/371361J-01/lvpage/plotpropertydb_quiver/

 

Regards,

 

Jason D

Applications Engineer

National Instruments

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

Thank you,

 

I attach the image before and after execute the .vi. You just choose the .csv as you did and run. Carefully look at the graph, you can see a plane inside it. I don't know why the 3D vectors become a plane vector? Each file of .csv is component of vectors in the x, y, z axes.

 

 

What's I want is to plot the 3D vectors as ploted in Matlab. you mean if i disable the Normalize.vi, I can get what i want or it just change the length of normal vector ?

 

Simply, the inputs is 3 components of vector in x, y, z axes then the output is 3D vector. I don't want to plot normal vector!

 

Thank you !

 

 

 

Download All
0 Kudos
Message 7 of 9
(9,370 Views)

The Nx, Ny, Nz specify the direction of the vector only. The vector length will be ignored after normalization. So vectors in the center of your plot don't have longer length like Matlab. The current quiver plot doesn't export "ignore normalization" as a property. So if you want the vector with its original length, you will need to modify the source like Jason said.

SourceChange.png

Besides, you also need to turn off the auto range for Z axis since all z values are same. For example, give -2 to 5 like your Matlab screenshot. After that, you will get this image.

IgnoreNormal.png

Message 8 of 9
(9,349 Views)

Thank you very much Hanrock and Jason ^^

 

I got it and it works well. Actually, I tried the way as Jason said. But at that time I just disable the Normalize.vi block, not the larger block as Hanrock did. Now I got what I want ^^ Thanks so much Hanrock!

0 Kudos
Message 9 of 9
(9,340 Views)