随笔分类 -  数学-几何

摘要:#include using namespace std; #define maxn 510 const double eps=1E-8; int sig(double d){ return(d>eps)-(d0) pp[m++]=p[i]; if(sig(cross(a,b,p[i]))!=sig(cross(a,b,p[i+1]))) ... 阅读全文
posted @ 2019-04-19 10:14 真想不出名字了 阅读(870) 评论(0) 推荐(0)
摘要:Problem Description The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes 阅读全文
posted @ 2018-10-29 21:12 真想不出名字了 阅读(252) 评论(0) 推荐(0)
摘要:①三角形-海伦公式(已知三边) 公式中a,b,c分别为三角形三边长,p为半周长,S为三角形的面积。 ps:因为有根号的出现,精度损失较大!! double STriangle(double a,double b,double c) { double p=(a+b+c)*0.5; double s=s 阅读全文
posted @ 2018-05-17 16:05 真想不出名字了 阅读(587) 评论(0) 推荐(0)
摘要:(1) 快速排斥 就是初步的判断一下,两条线段是不是相交,以两条线段为对角线的矩形,如果不重合的话,那么两条线段一定不可能相交。 <1>线段ab的低点低于cd的最高点(可能重合) <2>cd的最左端小于ab的最右端(可能重合) <3>cd的最低点低于ab的最高点(加上条件1,两线段在竖直方向上重合) 阅读全文
posted @ 2018-05-15 22:24 真想不出名字了 阅读(988) 评论(0) 推荐(0)
摘要:①求n条“V”型折线所能分割的最大平面数: (1) 当增加第n条直线时,为了使平面最多,则第n条直线要与前面2*(n-1)条直线都相交,且没有任何三条直线相交于一点。 (2) 作图可知,每作出一条符合条件的直线,就会有[2*(n-1)+1]个新平面生成,所以两条平行直线就会新生成2*[2*(n-1) 阅读全文
posted @ 2018-05-14 22:39 真想不出名字了 阅读(285) 评论(0) 推荐(0)
摘要:描述 Given the coordinates of the vertices of a triangle,And a point. You just need to judge whether the point is in the Triangle. Given the coordinates 阅读全文
posted @ 2018-05-14 21:52 真想不出名字了 阅读(278) 评论(0) 推荐(0)
摘要:描述 There are two circles on the plane. Now you must to calculate the area which they cover the plane. For example, in Figure 1, the area of the red re 阅读全文
posted @ 2018-05-08 23:05 真想不出名字了 阅读(325) 评论(0) 推荐(0)
摘要:You are given n points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the v 阅读全文
posted @ 2018-04-14 21:53 真想不出名字了 阅读(357) 评论(0) 推荐(0)