題目大意:求乙個三角形中每個內角的角三等分線組成的三角形的三個點的座標;
題目解析:沒有演算法可言,直接上模板;
ac**:
#includeusing namespace std;
struct point
};typedef point vector;
vector operator + (vector a,vector b)
vector operator - (vector a,vector b)
vector operator * (vector a,double p)
vector operator / (vector a,double p)
bool operator < (const point& a,const point& b)
//點在直線上的投影
point getlineprojection(point p,point a,point b)
//判斷兩直線是否規範相交
bool segmentproperintersection(point a1,point a2,point b1,point b2)
//計算多邊形的有向面積
double polygonarea(point* p,int n)
{ double area=0;
for(int i=1;i
uva 11178 計算幾何
函式較多,作為模板。include include include using namespace std struct point 定義點的時候直接利用建構函式,很方便 typedef point vector 這裡因為向量都有兩個維度的有序參量 vector operator vector a,...
UVA 11178 Morley定理 二維幾何問題
uva 11178 morley定理 morley定理 作三角形abc每個內角的三等分線,相交成三角形def,則def是等邊三角形。輸入t樣例數,之後輸入一行6個整數xa,ya,xb,yb,xc,yc 輸出六個實數xd,yd,xe,ye,xf,yf 解題思路 1,這題就是呼叫我們之前準備模版裡面的函...
計算幾何專項 UVa 11072
一道純的模板,就是先求乙個凸包,然後再判斷點是否在凸包內。需要注意給定點與凸包頂點重合的情況 樣例裡就有這樣的情況,恩,樣例還是給了提示的 include include include include include using namespace std define m 100010 stru...