LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d Curve: Interpolate points and Add a diameter

Hello everyone.

I have a 3D curve that plots an array of X, Y, and Z values. There are, however, two problems that I have with my plot:

1) I want to fit a polynomial to the "curve" (which at the moment, is of course a series of lines with sharp corners). How does one go about fitting a polynomial to a 3d array of points?

2) I want to add a diameter to my 3d curve. If you imagine that my plot looks like a tree branch, I would like for that tree branch to have some known diameter. At the moment I just have to thicken the line depth on the 3d Curve options, but of course this is insufficient and looks poor. I assume that I may need another type of 3D graph for this, but I'm not sure where to start.


Thank you!
0 Kudos
Message 1 of 7
(3,180 Views)

ap8888,

Post a data sample and possibly the graphing portion of your vi. and you will get a better response, probably involving the CWPLOT3D.

I'm not the only one that likes to play with dataSmiley Very Happy  -SS



0 Kudos
Message 2 of 7
(3,169 Views)
Sure.

This VI, of course, is actually a subVI in my larger program. All of the values, particularly the "normals" are constantly changing, and hence the curve changes as well.
0 Kudos
Message 3 of 7
(3,162 Views)
You could spline each dimension as a function of index and then interpolate with more points. Here's a rough example.
 
Message 4 of 7
(3,139 Views)
Thank you altenbach for your response.

May I ask, however, what the first 3dCurve VI does? I don't understand what it's for when all the interpolated points are passed to the second 3dCurve VI. Also, how do make the red-points appear? Does this perhaps have something to do with the first 3dCurve?

0 Kudos
Message 5 of 7
(3,106 Views)
The graph shows two datasets.
  1. The raw data as red points
  2. the interpolated data as a line.

If you only want to show the interpolated data, you don't need (1), but how else would you test that the algorithm actually works? 😉

To change the plot styles, right-click the graph and select "CWGraph3D...properties...".

You see that plot-1 has red dots and plot-2 has green lines. Modify as needed.



Message Edited by altenbach on 07-31-2008 09:34 AM
0 Kudos
Message 6 of 7
(3,087 Views)


ap8888 wrote:
2) I want to add a diameter to my 3d curve. If you imagine that my plot looks like a tree branch, I would like for that tree branch to have some known diameter. At the moment I just have to thicken the line depth on the 3d Curve options, but of course this is insufficient and looks poor. I assume that I may need another type of 3D graph for this, but I'm not sure where to start.

Yes, you should go with the 3D picture control. Maybe you can use a series of cylinders, for example.
0 Kudos
Message 7 of 7
(3,083 Views)