LAVA: make a path through points in 3D - LAVA

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

make a path through points in 3D Rate Topic: -----

#-19 User is offline   Trin 

  • More Active
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 03-April 10
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 July 2010 - 08:28 AM

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
0

#-18 User is offline   vugie 

  • Very Active
  • Group: Moderators
  • Posts: 210
  • Joined: 08-January 07
  • Location:Warsaw, Poland
  • Version:LabVIEW 8.2
  • Since:2006

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.
0

#-17 User is offline   Trin 

  • More Active
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 03-April 10
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

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? :wacko:
0

#-16 User is offline   vugie 

  • Very Active
  • Group: Moderators
  • Posts: 210
  • Joined: 08-January 07
  • Location:Warsaw, Poland
  • Version:LabVIEW 8.2
  • Since:2006

Posted 21 July 2010 - 12:49 PM

As for interpolation it would be something like this:
Attached Image: points interpolation.png

For creating the buffer you may use i.e. Functional Global
0

#-15 User is offline   Trin 

  • More Active
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 03-April 10
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

Posted 23 July 2010 - 08:48 AM

Attached Image: Unbenannt.JPGAttached Image: Unbenannt.JPGThx vugie, as always quick and useful, i tried to apply the procedure on my cube, so when i click the marked points will be connected, but the result is, all the points are connected to the center of cube, i doubt may be because of the way i change the pick points value to cluster of array, i tried to use it without interpolation, but still no success. that would be nice if you or any one else can take a look at my VI and give me some hints.

Thanks

This post has been edited by Trin: 23 July 2010 - 08:50 AM

0

#-14 User is offline   vugie 

  • Very Active
  • Group: Moderators
  • Posts: 210
  • Joined: 08-January 07
  • Location:Warsaw, Poland
  • Version:LabVIEW 8.2
  • Since:2006

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.
0

#-13 User is offline   Trin 

  • More Active
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 03-April 10
  • Location:Germany
  • Version:LabVIEW 2009
  • Since:2009

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?

Attached thumbnail(s)

  • Attached Image: cube.JPG
  • Attached Image: connect line.JPG

0

#-12 User is offline   vugie 

  • Very Active
  • Group: Moderators
  • Posts: 210
  • Joined: 08-January 07
  • Location:Warsaw, Poland
  • Version:LabVIEW 8.2
  • Since:2006

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic