Jump to content

make a path through points in 3D


Recommended Posts

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

Link to comment

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.

Link to comment

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:

Link to comment

post-17326-084785700 1279874982_thumb.jppost-17326-084785700 1279874982_thumb.jpThx 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

Edited by Trin
Link to comment

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.

Link to comment

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?

post-17326-057140100 1280150243_thumb.jp

post-17326-055029300 1280150255_thumb.jp

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.