Hi lavas,
i need to make a path through the marked points of my 3D object.Do i need to do the interpolation between points or i need to find the intersection of planes for each marked points. Does LabView have any kind of implemented feature that i can use? any idea or any examole will help me for sure.
Cheers
Page 1 of 1
make a path through points in 3D
#-18
Posted 21 July 2010 - 09:17 AM
It depends on how exactly you want to represent the curve. If it is ok to connect your points with straight lines you may feed directly their coordinates to mesh primitive with "line strip" mode. If you want more smooth curve, you have to do interpolation - this is as simple as 1D interpolation separately for each coordinate.
I assume that you know the order of your points, in other case you have to sort them somehow before and it may be more complicated than interpolation.
I assume that you know the order of your points, in other case you have to sort them somehow before and it may be more complicated than interpolation.
#-17
Posted 21 July 2010 - 12:22 PM
Thx for your quick reply, do you have any example VI so i can get some ideas?! also, i have a problem i need to save my mouse coordination after each click, so use them as vertices. i use pick point method to get the coord, so i need something like a buffer to save the previous click as well,any idea?
#-16
Posted 21 July 2010 - 12:49 PM
As for interpolation it would be something like this:

For creating the buffer you may use i.e. Functional Global
For creating the buffer you may use i.e. Functional Global
#-15
Posted 23 July 2010 - 08:48 AM
Thanks
This post has been edited by Trin: 23 July 2010 - 08:50 AM
#-14
Posted 23 July 2010 - 10:16 AM
Look carefully what are you doing: for each mouse click you get cluster of 3 coordinates, make a SINGLE element array of cluster of 3 coordinates (?), interpolate over this 1-element array (I don't know for how many samples you do it, but for default - linear interpolation, you'll get 1 usable sample and the rest will be Inf), and then create line out of it. So you create ONE line object, made of ONE point for EACH mouse click...
Instead you should create a line object with null mesh outside the loop, keep its reference and at each mouse click add point to the buffer (kept in shift register for example), and UPDATE mesh of the line object out of WHOLE buffer.
BTW, You use Mouse Down event. It is better to use Mouse Up, because Mouse Down fires continuously as button is hold.
Instead you should create a line object with null mesh outside the loop, keep its reference and at each mouse click add point to the buffer (kept in shift register for example), and UPDATE mesh of the line object out of WHOLE buffer.
BTW, You use Mouse Down event. It is better to use Mouse Up, because Mouse Down fires continuously as button is hold.
#-13
Posted 26 July 2010 - 01:17 PM
Thans Vugie, ur hints were really useful as usual, i tried to applied whatever you had said and i have just one more question,the problem with connecting line is that, when i want to connect two points from different faces of cube, they will connect to each other from the inside of cube, so user cant see the line,this probelm is true for the curves as well,i thought may be i should find the intersection of a plane that this two points makes and the connection line should be in that plane,Thats just a guess, may be some more idea?
#-12
Posted 26 July 2010 - 02:09 PM
If the only goal is to let the user see the line, you may make the box semi-transparent... If it is not the case you have to calculate proper path by yourself.
Share this topic:
Page 1 of 1

Help


Back to top









