随笔分类 -  计算几何

摘要:struct point { double x,y; }; struct line { point a,b; }lines[110]; double chaji(point a,point b,point c,point d) { return (b.x-a.x)*(d.y-c.y)-(b.y-a.y)*(d.x-c.x); } bool isin(line l... 阅读全文
posted @ 2016-08-08 13:57 相儒以沫 阅读(1373) 评论(0) 推荐(0)
摘要:求凸包模版 阅读全文
posted @ 2016-07-25 13:07 相儒以沫 阅读(739) 评论(0) 推荐(1)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 struct circle 10 { 11 double x,y,r; 12 }c[25]... 阅读全文
posted @ 2015-10-03 10:24 相儒以沫 阅读(412) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 5 struct point 6 { 7 double x,y; 8 }p[110]; 9 10 double siz(point p1,point p2,point p3)11 {12 ... 阅读全文
posted @ 2015-10-01 10:43 相儒以沫 阅读(138) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 using namespace std; 5 6 struct line 7 { 8 double x1; 9 double y1;10 double x2;11 double y2;12 }l[110];... 阅读全文
posted @ 2015-10-01 10:14 相儒以沫 阅读(147) 评论(0) 推荐(0)
摘要:1 struct point 2 { 3 double x, y; 4 point( double _x = 0, double _y = 0 ) 5 { 6 x = _x; 7 y = _y; 8 } 9 point ope... 阅读全文
posted @ 2015-08-10 19:58 相儒以沫 阅读(205) 评论(0) 推荐(0)