找到非阻塞区域/线的算法

时间:2014-10-09 10:43:45

标签: algorithm 2d

图:

enter image description here

我可以找到什么算法来查找非阻塞线?

例如:

Input:
Red dot = [x=100, y=200]
Blue lines = [x1=300, y1=100, x2=300, y2=300], [x1=400, y1=0, x2=400, y2=400]

输出:

Green lines, which is visible from the red dot.

1 个答案:

答案 0 :(得分:0)

看一下光线追踪。您只需要一个简化版本即可获得从视点到第一个障碍物的光线交叉点。