
计算几何
明月千里赴迢遥
这个作者很懒,什么都没留下…
展开
-
C++ 给两直线上四个点求交点
理论代码来源Point getIntersectPoint(Line a, Line b) { double a1 = a.s.y - a.e.y, b1 = a.e.x - a.s.x, c1 = a.s.x * a.e.y - a.e.x * a.s.y; double a2 = b.s.y - b.e.y, b2 = b.e.x - b.s.x, c2 = b.s.x * b.e.y - b.e.x * b.s.y; return Point((c1*b2-c2*b1)/(a2*转载 2021-09-06 03:17:45 · 1321 阅读 · 0 评论 -
POJ 3608 凸包最小间距
下面有很多没用到的函数,所以请从主函数开始看计算几何详解请参考我的博客计算几何基础#include<cstdio> //计算几何基础 代码 https://blog.youkuaiyun.com/qq_44691917/article/details/104686146 #include<iostream>//理论https://www.luogu.com.cn/blog/wjyyy/geometry1 #include<cmath>//自己写的总结 https://m原创 2021-09-04 22:37:47 · 147 阅读 · 0 评论 -
HDU 5251
这题老早就想A了,就因为这个才想学旋转卡壳,但是折磨了我好久,今天终于过了哈哈哈凸包及旋转卡壳请参考我的这篇博客https://mp.youkuaiyun.com/mp_blog/creation/editor/120031148这题跟模板不同的是题目要求输出整数,而且是四舍五入的!一开始没注意到吃了大亏,不过不吃那亏也注意不到我模板写错了……因祸得福哈哈模板和原理都在上篇博客中讲述的很清楚了,下面是模板的运用AC代码#include<cstdio> //计算几何基础 代码 htt原创 2021-09-04 06:20:56 · 209 阅读 · 0 评论 -
计算几何基础(施工未完)
目录总模板点和向量部分点和线部分总模板#include<cstdio> //计算几何基础 代码 https://blog.youkuaiyun.com/qq_44691917/article/details/104686146 #include<iostream>//理论https://www.luogu.com.cn/blog/wjyyy/geometry1 #include<cmath>using namespace std;#define Vect原创 2021-09-01 02:48:54 · 1112 阅读 · 1 评论