LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing from Normals and some Parameters

Excuse the obvious absurdity of my question, but I can't really figure this out.

Say I have a bunch of vectors, n_1, n_2, n_3 and a bunch of scalars, "a", "b", and "c". Say I want to plot a curve or linear plot that does the following:

The base of the curve starts at a datum (0,0,0), and goes along n_1 for a distance of "a". After reaching distance "a", it travels from that point, along n_2 for a distance "b". After reaching the distance "b", it changes direction once again and travels along n_3 for a distance "c".

That result is like a branch of a tree with segments of different lengths. As icing on the cake, I'm also trying to figure out how to do the following:

(1) Have some sort of interpolation or smoothing at the "joints" (the intersections of n_1 and n_2, for example).
(2) Add a diameter to this "branch" thing (for my own visualization needs).

Let me know if you have any ideas. I certainly have very few.

Thanks,
Alex



0 Kudos
Message 1 of 8
(3,297 Views)
Does anyone have any recommendations?

Thank you as always,
Alex
0 Kudos
Message 2 of 8
(3,279 Views)
Let me rephrase all of this mess:
---------------

I have three vectors with known magnitude and direction. I need to plot these vectors head-to-tail.

(If possible, I also want to look into smoothing the joints, or the locations where the heads-and-tails meet)

--------------------
0 Kudos
Message 3 of 8
(3,269 Views)
Alex,

How are you representing the vectors n_1, n_2,and n_3? In LV vectors are usually arrays, but you mentioned Normals. Are these vectors fixed or variable?

Are you working in 3 dimensions?

Lynn
0 Kudos
Message 4 of 8
(3,265 Views)


@johnsold wrote:
Alex,

How are you representing the vectors n_1, n_2,and n_3? In LV vectors are usually arrays, but you mentioned Normals. Are these vectors fixed or variable?

Are you working in 3 dimensions?

Lynn

Thanks for answering!

My "vectors" n_1, n_2 and n_3 are in the form of three arrays (with x, y, z components). So yes I am in 3d.

These "vectors" or arrays are calculated from a Cross-product algorithm and some other simple vector operations. The inputs for these arrays or vectors is continous, that is, it is constantly changing and my vectors will be therefore continually in flux.

So:

Define three arrays or vectors --> Do some vector math on 3 arrays  --> Do a cross product --> Obtain 3 arrays which are called "normals" in my case --> Graph the three "vectors" head-to-tail
0 Kudos
Message 5 of 8
(3,262 Views)
Alex,

Look at 3D graphs and the picture controls. I have not worked with them much but I have seen some pretty impressive displays.

Can you calculate the equation of the lines represented by the normals? Then the first segment is the plot of the line from the origin along the line n_1 until it reaches the length a. The next segment is calculated as the line which intersects the endpoint of the first segment and proceeds along n_2.... Working out the math on paper is a bit tedious, but once done I think the calculations the program needs to make are fairly simple.

Lynn
0 Kudos
Message 6 of 8
(3,252 Views)


@johnsold wrote:
Alex,

Look at 3D graphs and the picture controls. I have not worked with them much but I have seen some pretty impressive displays.

Can you calculate the equation of the lines represented by the normals? Then the first segment is the plot of the line from the origin along the line n_1 until it reaches the length a. The next segment is calculated as the line which intersects the endpoint of the first segment and proceeds along n_2.... Working out the math on paper is a bit tedious, but once done I think the calculations the program needs to make are fairly simple.

Lynn

Excuse me Lynn, but I've been having a lot of trouble finding any good tutorials regarding vectors in 3d Graphs. If only I had a few good examples, I think I may figure this out.

Has anyone had experience with plotting vectors via 3D Graph functions in LV?
0 Kudos
Message 7 of 8
(3,240 Views)
Hi Alex,

What you are trying to do should actually not be that complicated and I recommend you use the 3D Curve VI for this purpose. This VI actually takes in 3 arrays, each one representing the X, Y, and Z vectors. This VI should do what you need. Please take a look at the help file (here) for this function, it should be pretty clear and if you look towards the end, it references an example that comes with LabVIEW. You can get to this example from the example finder if you search by name. Additionally, please take a look at the this DeveloperZone Article.

 
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(3,205 Views)