![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计算几何
溺水行舟
这个作者很懒,什么都没留下…
展开
-
点关于直线的对称点
挺简单的公式: #include int main() { int n; float a,b,A,B,C,a1,b1; scanf("%d\n",&n); while(n--) { scanf("%f %f %f %f %f",&a,&b,&A,&B,&C); int a1=int (a-2*A*(A*a+B*b+C)/(A原创 2012-08-04 17:35:05 · 1978 阅读 · 0 评论 -
poj 1410 矩形与线段相交判断
#include #include #include #include using namespace std; struct point { int x,y; }; int xj(point x1,point x2,point x3,point x4)//相交为1,不交为0 { if(min(x1.x,x2.x)>max(x3.x,x4.x)||min(x1.y,原创 2012-07-30 13:37:18 · 803 阅读 · 0 评论 -
poj 2653二维vector线段相交
#include #include #include #include #include const double N=-1e-10; using namespace std; int bz[1005]; struct point { double x,y; }; vector a[100005]; int xj(point x1,point x2,point x3原创 2012-07-30 17:49:59 · 910 阅读 · 0 评论 -
poj 2653二维vector判断直线相交
#include #include #include #include #include const double N=-1e-10; using namespace std; int bz[1005]; struct point { double x,y; }; vector a[100005]; int xj(point x1,point x2,point x3原创 2012-07-30 17:51:18 · 846 阅读 · 0 评论 -
凸包问题——圈水池(nyist 78)
#include #include #include using namespace std; struct point { int x,y; }; int cmp1 (point A,point B)// 按y排序 { return A.y < B.y || (A.y == B.y && A.x < B.x); } int cmp2(point原创 2012-07-31 13:00:05 · 896 阅读 · 0 评论