09-20-2016 12:31 AM
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
09-20-2016 12:45 AM
09-20-2016 02:00 AM
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
09-20-2016 05:10 AM - edited 09-20-2016 05:11 AM
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.!