Line of Sight Algorithm for Graph/Tree search

211 Views Asked by At

I implemented Bresenham's line algorithm in Python for identifying the occupancy of the grids between a noted list of grid cells for a Grid world (say [(1,1), (3,2),(5,6),(8,4) in a 10X10 grid world with some occupied grids) and then applied line of sight algorithm to check if I can skip any vertex list in order to reduce the total distance.

But how can I do Line of sight for graph based search ? I wonder how can I represent Tree/Graph nodes like I represented grid cells in coordinate form (x,y) ? Any suggestions/ideas are highly appreciated.

0

There are 0 best solutions below