摘要: 圆形 struct circle{ //圆心 Point p; //半径 double r; circle(){} circle(Point _p,double _r){ p = _p; r = _r; } circle(double x,double y,double _r){ p = Point 阅读全文
posted @ 2020-07-11 00:33 fxq1304 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 多边形 struct polygon{ int n; Point p[maxp]; Line l[maxp]; void input(int _n){ n=_n; for(int i=0;i< n;i++) p[i].input(); } void add(Point q){ p[n++]=q; } 阅读全文
posted @ 2020-07-11 00:32 fxq1304 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 直线与线段 struct Line{ Point s,e; Line(){} Line(Point _s,Point _e){ s = _s; e = _e; } bool operator == (Line v){ return (s==v.s) && (e==v.e); } //根据一个点和倾斜 阅读全文
posted @ 2020-07-11 00:25 fxq1304 阅读(12) 评论(0) 推荐(0) 编辑