随笔- 1046
文章- 115
评论- 19
阅读-
36万
文章分类 - 几何问题
矩形面积并
摘要:#include #include #include using namespace std; const int maxn = 100 + 5; /// 可能 是double struct node{ int x1, y1; int x2, y2; }; node a[maxn]; int x[maxn= a[h].x2) break; fo...
阅读全文
线段相交
摘要:转载地址:http://blog.csdn.net/rickliuxiao/article/details/6259322 算法1: 算法2: 算法3:http://dec3.jlu.edu.cn/webcourse/t000096/graphics/chapter5/01_1.html main函
阅读全文
极角排序
摘要:转载地址:http://blog.csdn.net/zxy_snow/article/details/6700847 atan2是按向量排序的,这个很好啊,可是就是可能会伤精度,那么会死很惨的。 atan2的参数是向量的y坐标,x坐标,排序范围是(-180°, +180°]。 象限排序是不损精度的,
阅读全文