摘要: 求多边形重心的题目大致有这么几种: 1、质量集中在顶点上 n个顶点坐标为(xi,yi),质量为mi,则重心 X = ∑( xi×mi ) / ∑mi Y = ∑( yi×mi ) / ∑mi 特殊地,若每个点的质量相同,则 X = ∑xi / n Y = ∑yi... 阅读全文
posted @ 2015-12-16 14:15 StevenLuke 阅读(96) 评论(0) 推荐(0) 编辑
摘要: S(abc) = (|ab|*|ac|*sinΘ) / 2 = |ab| × |ac| / 2//叉积 #include struct point { double x1, y1, x2, y2;}buf[101];int judge(int i, int j) { //叉积 int f1=... 阅读全文
posted @ 2015-12-16 13:18 StevenLuke 阅读(112) 评论(0) 推荐(0) 编辑