Re: [問題] 面試問到的問題...

作者: Leon (Achilles)   2012-12-13 12:07:33
※ 引述《Favonia (小西風最乖了*^^*)》之銘言:
: ※ 引述《Leon (Achilles)》之銘言:
: : 你下面提出的 Bentley-Ottmann, 我不熟悉
: : 所以我去看了一下. 這似乎試用在 line segment.
: : 如果用 duality 變換, 出來的應該為 line, 而不是 line segment.
: : 在這個情況下, 要怎麼改?
: 我是初次看到這題目,還請網友幫忙驗證。
: 可以想像只要取夠長的線段就好了,因為無窮遠的交點已經
: 先處理掉(也就是平行線)。因為沒有垂直線,可以想像在很遠
: 的地方會按照斜率排序。因此我們就按照斜率排序,算出斜率相
: 鄰的直線到多遠以後就不會交叉。
I think this is the critical step..
How to calculate it?
To me, it looks like no easy solution..
Because it couples with the distance to origin,
not only the slope.
Can you write down the detail?

Links booklink

Contact Us: admin [ a t ] ucptt.com