LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create points along lines and the center of the points

Hi,

I'm doing the small project that generates points along the lines, and points along the obstacals. I've uploaded a picture of the XY graph for the enviroment.

What I'd like to do is creating points that representing the white lines in the picture. Currently, the lines in the XY graph are represented by the just two edg points.

I'm thinking using a method which can define the point density, so I can decide the number of points that represent a line.

Do you guys have any thought on how to create points along a line?

 

Thank you for your help,

Chao

0 Kudos
Message 1 of 4
(3,067 Views)

Hi Chao,

 

how do you draw the points right now?

 

When you need more points you need to create those points.

I suggest to use an additional plot, and set that plot to show only points without interpolation lines…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,062 Views)

Hi GerdW,

Thanks for the reply, currently, I draw these lines by using the Property Node. For the white lines, so I feed in two points and then plot the line between each points. 

The further work I'd like to do is to implement path planning, so i need points that represent walls, obstacles for the path planning algorithm to identify them. 

I think what you suggested to plots points instead of the interpolation line is what I want. But I'm still struggling with the idea about how to plot points along a line by konwing two end points of that line.

I'm thinking that calcuating gradient of the line and fill the points along that line. But how to get started buzzles me now.

 

Thank you,

Chao

0 Kudos
Message 3 of 4
(3,039 Views)

Hi Chao,

 

I'm thinking that calcuating gradient of the line and fill the points along that line. But how to get started buzzles me now.

That's how you need to do it - if you still want to use a XY graph. Read about Bresenham!

How do you draw lines using "property nodes"?

 

You could also use a 2D Picture indicator. Here you get functions to draw points/lines/rectangles/etc.!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(3,026 Views)