Drawing resizable (not intersecting) polygons

百般思念 提交于 2019-12-03 16:32:46

Depending on how many points that you allow, a naive, simple O(N^2) line intersection algorithm suffices. Algorithmically this is not the best solution, but for starting out it's the most accessible for a beginner in computational geometry.

For starter, see Wikipedia article on line segment intersection. One of its links has an easy to understand explanation on how to compute the intersection point of two line segments.

Good luck!

Daniel Vassallo

While this is not a complete answer, note that the example you supplied appears to be using the Geometry Controls from the GMaps Utility Library, which is an open source project hosted on Google Code.

You can check the full source code in the Google Code browser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!