平面計算幾何模板

https://vjudge.net/problem/UVA-12304
大白書 267

#include<cmath>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<cstring>
#include<iostream>
const double EPS = 1e-10;
const  double PI=acos(-1);
using namespace std;
struct Point{
     double x;
     double y;
    Point( double x=0, double y=0):x(x),y(y){}
    //void operator<<(Point &A) {cout<<A.x<<' '<<A.y<<endl;}
};

int dcmp(double x) {
    if(fabs(x) < EPS) return 0;
    else return x < 0 ? -1 : 1;
}

typedef  Point  Vector;

Vector  operator +(Vector A,Vector B) { return Vector(A.x+B.x,A.y+B.y);}

Vector  operator -(Vector A,Vector B) { return Vector(A.x-B.x,A.y-B.y); }

Vector  operator *(Vector A, double p) { return Vector(A.x*p,A.y*p);  }

Vector  operator /(Vector A, double p) {return Vector(A.x/p,A.y/p);}

ostream &operator<<(ostream & out,Point & P) { out<<P.x<<' '<<P.y<<endl; return out;}

bool  operator< (const Point &A,const Point &B) { return dcmp(A.x-B.x)<0||(dcmp(A.x-B.x)==0&&dcmp(A.y-B.y)<0); }

bool  operator== ( const Point &A,const Point &B) { return dcmp(A.x-B.x)==0&&dcmp(A.y-B.y)==0;}

//向量點積
 double  dot(Vector A,Vector B) {return A.x*B.x+A.y*B.y;}
//向量叉積
 double  cross(Vector A,Vector B)  {return A.x*B.y-B.x*A.y; }

//向量長度
 double  length(Vector A)  { return sqrt(dot(A, A));}

//向量夾角
 double  angle(Vector A,Vector B) {return acos(dot(A,B)/length(A)/length(B));}

 //三角形有向面積的二倍
 double  area2(Point A,Point B,Point C ) {return cross(B-A, C-A);}

 //向量逆時針旋轉rad度(弧度)
Vector rotate(Vector A, double rad) { return Vector(A.x*cos(rad)-A.y*sin(rad),A.x*sin(rad)+A.y*cos(rad));}

//計算向量A的單位法向量。左轉90°,把長度歸一。調用前確保A不是零向量。
Vector normal(Vector A) { double L=length(A);return Vector(-A.y/L,A.x/L);}

/************************************************************************
使用復數類實現點及向量的簡單操作

#include <complex>
typedef complex<double> Point;
typedef Point Vector;

double dot(Vector A, Vector B) { return real(conj(A)*B)}
double cross(Vector A, Vector B) { return imag(conj(A)*B);}
Vector rotate(Vector A, double rad) { return A*exp(Point(0, rad)); }

*************************************************************************/

/****************************************************************************
* 用直線上的一點p0和方向向量v表示一條指向。直線上的所有點P滿足P = P0+t*v;
* 如果知道直線上的兩個點則方向向量為B-A, 所以參數方程為A+(B-A)*t;
* 當t 無限制時, 該參數方程表示直線。
* 當t > 0時, 該參數方程表示射線。
* 當 0 < t < 1時, 該參數方程表示線段。
*****************************************************************************/

//直線交點,須確保兩直線有唯一交點。
Point getLineIntersection(Point P,Vector v,Point Q,Vector w)
{
    Vector u=P-Q;
     double t=cross(w, u)/cross(v,w);
    return P+v*t;

}
//點到直線距離
 double distanceToLine(Point P,Point A,Point B)
{
    Vector v1=P-A; Vector v2=B-A;
    return fabs(cross(v1,v2))/length(v2);

}

//點到線段的距離
 double distanceToSegment(Point P,Point A,Point B)
{
    if(A==B)  return length(P-A);

    Vector v1=B-A;
    Vector v2=P-A;
    Vector v3=P-B;

    if(dcmp(dot(v1,v2))==-1)    return  length(v2);
    else if(dot(v1,v3)>0)    return length(v3);

    else return distanceToLine(P, A, B);

}

//點在直線上的投影
Point getLineProjection(Point P,Point A,Point B)
{
    Vector v=B-A;
    Vector v1=P-A;
     double t=dot(v,v1)/dot(v,v);

    return  A+v*t;
}

//線段相交判定,交點不在一條線段的端點
bool  segmentProperIntersection(Point a1,Point a2,Point b1,Point b2)
{
     double c1=cross(b1-a1, a2-a1);
     double c2=cross(b2-a1, a2-a1);
     double c3=cross(a1-b1, b2-b1);
     double c4=cross(a2-b1, b2-b1);

    return dcmp(c1)*dcmp(c2)<0&&dcmp(c3)*dcmp(c4)<0 ;

}

//判斷點是否在點段上,不包含端點
bool  onSegment(Point P,Point A,Point B)
{
    return dcmp(cross(P-A, P-B))==0&&dcmp(dot(P-A,P-B))<0;
}

//計算凸多邊形面積
double convexPolygonArea(Point *p, int n) {
    double area = 0;
    for(int i = 1; i < n-1; i++)
        area += cross(p[i] - p[0], p[i+1] - p[0]);
    return area/2;
}

//計算多邊形的有向面積
 double polygonArea(Point *p,int n)
{
     double area=0;

    for(int i=1;i<n-1;i++)
    {
        area+=cross(p[i]-p[0], p[i+1]-p[0]);

    }
    return area/2;

}

/***********************************************************************
* Morley定理:三角形每個內角的三等分線,相交成的三角形是等邊三角形。
* 歐拉定理:設平面圖的定點數,邊數和面數分別為V,E,F。則V+F-E = 2;
************************************************************************/
Point  read_point()
{
    Point P;
    scanf("%lf%lf",&P.x,&P.y);
    return  P;
}

struct Circle
{
    Point c;
     double r;

    Circle(Point c=Point(0,0), double r=0):c(c),r(r) {}
    
    //通過圓心角確定圓上坐標
    Point point( double a)
    {
        return Point(c.x+r*cos(a),c.y+r*sin(a));
    }

};

struct  Line
{
    Point p;
    Vector v;
    double ang;
    Line(Point p=Point(0,0),Vector v=Vector(0,1)):p(p),v(v) {}

    Point point( double t)
    {
        return Point(p+v*t);
    }
    bool operator < (const Line& L) const {
        return ang < L.ang;
    }
};


//直線和圓的交點,返回交點個數,結果存在sol中。
//該代碼沒有清空sol。
int getLineCircleIntersection(Line L,Circle cir, double &t1, double &t2,vector<Point> &sol)
{
     double a=L.v.x;
     double b=L.p.x-cir.c.x;
     double c=L.v.y;
     double d=L.p.y-cir.c.y;

     double e=a*a+c*c;
     double f=2*(a*b+c*d);
     double g=b*b+d*d-cir.r*cir.r;

     double delta=f*f-4*e*g;

    if(dcmp(delta)<0) return 0;

    if(dcmp(delta)==0)
    {
        t1=t2=-f/(2*e);
        sol.push_back(L.point(t1));
        return 1;
    }
    else
    {
        t1=(-f-sqrt(delta))/(2*e);
        t2=(-f+sqrt(delta))/(2*e);

        sol.push_back(L.point(t1));
        sol.push_back(L.point(t2));

        return 2;
    }

}

// 向量極角公式
 double angle(Vector v)  {return atan2(v.y,v.x);}

 //兩圓相交
int getCircleCircleIntersection(Circle C1,Circle C2,vector<Point> &sol)
{
     double d=length(C1.c-C2.c);

     if(dcmp(d)==0)
     {
         if(dcmp(C1.r-C2.r)==0)  return -1;  // 重合
         else return 0;    //  內含  0 個公共點
     }

    if(dcmp(C1.r+C2.r-d)<0)  return 0;  // 外離
    if(dcmp(fabs(C1.r-C2.r)-d)>0)  return 0;  // 內含

     double a=angle(C2.c-C1.c);
     double da=acos((C1.r*C1.r+d*d-C2.r*C2.r)/(2*C1.r*d));

    Point p1=C1.point(a-da);
    Point p2=C1.point(a+da);

    sol.push_back(p1);

    if(p1==p2)  return 1; // 相切
    else
    {
        sol.push_back(p2);
        return 2;
    }
}


//過定點做圓的切線
//過點p做圓C的切線,返回切線個數。v[i]表示第i條切線
int getTangents(Point p,Circle cir,Vector *v)
{
    Vector u=cir.c-p;

     double dist=length(u);

    if(dcmp(dist-cir.r)<0)  return 0;

    else if(dcmp(dist-cir.r)==0)
    {
        v[0]=rotate(u,PI/2);
        return 1;
    }
    else
    {

         double ang=asin(cir.r/dist);
        v[0]=rotate(u,-ang);
        v[1]=rotate(u,+ang);
        return 2;
    }
}

//兩圓的公切線
//返回切線的個數,-1表示有無數條公切線。
//a[i], b[i] 表示第i條切線在圓A,圓B上的切點
int getTangents(Circle A, Circle B, Point *a, Point *b) {
    int cnt = 0;
    if(A.r < B.r) {
        swap(A, B); swap(a, b);
    }
    int d2 = (A.c.x - B.c.x)*(A.c.x - B.c.x) + (A.c.y - B.c.y)*(A.c.y - B.c.y);
    int rdiff = A.r - B.r;
    int rsum = A.r + B.r;
    if(d2 < rdiff*rdiff) return 0;   //內含
    double base = atan2(B.c.y - A.c.y, B.c.x - A.c.x);
    if(d2 == 0 && A.r == B.r) return -1;   //無限多條切線
    if(d2 == rdiff*rdiff) {         //內切一條切線
        a[cnt] = A.point(base);
        b[cnt] = B.point(base);
        cnt++;
        return 1;
    }
    //有外共切線
    double ang = acos((A.r-B.r) / sqrt(d2));
    a[cnt] = A.point(base+ang); b[cnt] = B.point(base+ang); cnt++;
    a[cnt] = A.point(base-ang); b[cnt] = B.point(base-ang); cnt++;
    if(d2 == rsum*rsum) {  //一條公切線
        a[cnt] = A.point(base);
        b[cnt] = B.point(PI+base);
        cnt++;
    } else if(d2 > rsum*rsum) {   //兩條公切線
        double ang = acos((A.r + B.r) / sqrt(d2));
        a[cnt] = A.point(base+ang); b[cnt] = B.point(PI+base+ang); cnt++;
        a[cnt] = A.point(base-ang); b[cnt] = B.point(PI+base-ang); cnt++;
    }
    return cnt;
}

typedef vector<Point> Polygon;

//點在多邊形內的判定
int isPointInPolygon(Point p, Polygon poly) {
    int wn = 0;
    int n = poly.size();
    for(int i = 0; i < n; i++) {
        if(onSegment(p, poly[i], poly[(i+1)%n])) return -1; //在邊界上
        int k = dcmp(cross(poly[(i+1)%n]-poly[i], p-poly[i]));
        int d1 = dcmp(poly[i].y - p.y);
        int d2 = dcmp(poly[(i+1)%n].y - p.y);
        if(k > 0 && d1 <= 0 && d2 > 0) wn++;
        if(k < 0 && d2 <= 0 && d1 > 0) wn++;
    }
    if(wn != 0) return 1;       //內部
    return 0;                   //外部
}

//凸包
/***************************************************************
* 輸入點數組p, 個數為p, 輸出點數組ch。 返回凸包頂點數
* 不希望凸包的邊上有輸入點,把兩個<= 改成 <
* 高精度要求時建議用dcmp比較
* 輸入點不能有重復點。函數執行完以后輸入點的順序被破壞
****************************************************************/
int convexHull(Point *p, int n, Point* ch) {
    sort(p, p+n);      //先比較x坐標,再比較y坐標
    int m = 0;
    for(int i = 0; i < n; i++) {
        while(m > 1 && cross(ch[m-1] - ch[m-2], p[i]-ch[m-2]) <= 0) m--;
        ch[m++] = p[i];
    }
    int k = m;
    for(int i = n-2; i >= 0; i++) {
        while(m > k && cross(ch[m-1] - ch[m-2], p[i]-ch[m-2]) <= 0) m--;
        ch[m++] = p[i];
    }
    if(n > 1) m--;
    return m;
}

//用有向直線A->B切割多邊形poly, 返回“左側”。 如果退化,可能會返回一個單點或者線段
//復雜度O(n2);
Polygon cutPolygon(Polygon poly, Point A, Point B) {
    Polygon newpoly;
    int n = poly.size();
    for(int i = 0; i < n; i++) {
        Point C = poly[i];
        Point D = poly[(i+1)%n];
        if(dcmp(cross(B-A, C-A)) >= 0) newpoly.push_back(C);
        if(dcmp(cross(B-A, C-D)) != 0) {
            Point ip = getLineIntersection(A, B-A, C, D-C);
            if(onSegment(ip, C, D)) newpoly.push_back(ip);
        }
    }
    return newpoly;
}

//半平面交
//點p再有向直線L的左邊。(線上不算)
bool onLeft(Line L, Point p) {
    return cross(L.v, p-L.p) > 0;
}

//兩直線交點,假定交點唯一存在
Point getIntersection(Line a, Line b) {
    Vector u = a.p - b.p;
    double t = cross(b.v, u) / cross(a.v, b.v);
    return a.p+a.v*t;
}

int halfplaneIntersection(Line* L, int n, Point* poly) {
    sort(L, L+n);               //按極角排序

    int first, last;            //雙端隊列的第一個元素和最后一個元素
    Point *p = new Point[n];    //p[i]為q[i]和q[i+1]的交點
    Line *q = new Line[n];      //雙端隊列
    q[first = last = 0] = L[0]; //隊列初始化為只有一個半平面L[0]
    for(int i = 0; i < n; i++) {
        while(first < last && !onLeft(L[i], p[last-1])) last--;
        while(first < last && !onLeft(L[i], p[first])) first++;
        q[++last] = L[i];
        if(fabs(cross(q[last].v, q[last-1].v)) < EPS) {
            last--;
            if(onLeft(q[last], L[i].p)) q[last] = L[i];
        }
        if(first < last) p[last-1] = getIntersection(q[last-1], q[last]);
    }
    while(first < last && !onLeft(q[first], p[last-1])) last--;
    //刪除無用平面
    if(last-first <= 1) return 0;   //空集
    p[last] = getIntersection(q[last], q[first]);

    //從deque復制到輸出中
    int m = 0;
    for(int i = first; i <= last; i++) poly[m++] = p[i];
    return m;
}

// 求內切圓坐標
Circle inscribledCircle(Point p1,Point p2,Point p3)
{
    double a=length(p2-p3);
    double b=length(p3-p1);
    double c=length(p1-p2);

    Point I=(p1*a+p2*b+p3*c)/(a+b+c);

    return Circle(I,distanceToLine(I, p1, p2));

}

//求外接圓坐標
Circle circumscribedCircle(Point p1,Point p2,Point p3)
{
    double Bx=p2.x-p1.x,By=p2.y-p1.y;
    double Cx=p3.x-p1.x,Cy=p3.y-p1.y;

    double D=2*(Bx*Cy-By*Cx);

    double cx=(Cy*(Bx*Bx+By*By)-By*(Cx*Cx+Cy*Cy))/D+p1.x;
    double cy=(Bx*(Cx*Cx+Cy*Cy)-Cx*(Bx*Bx+By*By))/D+p1.y;

    Point p=Point(cx,cy);

    return Circle(p,length(p-p1));
}

int main()
{
    char str[50];
    Point A,B,C;
    while(scanf("%s",str)!=EOF)
    {
          if(!strcmp(str,"CircumscribedCircle"))
          {
              A=read_point();
              B=read_point();
              C=read_point();
              Circle cir=circumscribedCircle(A, B, C);
              printf("(%.6f,%.6f,%.6f)\n",cir.c.x,cir.c.y,cir.r);
          }

          else if(!strcmp(str,"InscribedCircle"))
          {
              A=read_point();
              B=read_point();
              C=read_point();
              Circle cir=inscribledCircle(A, B, C);
              printf("(%.6f,%.6f,%.6f)\n",cir.c.x,cir.c.y,cir.r);

          }
          else if(!strcmp(str,"TangentLineThroughPoint"))
          {
              Circle  cir;
              cir.c=read_point();
              scanf("%lf",&cir.r);
              Point p=read_point();
              Vector vec[2];
               double val[2];
              int ans=getTangents(p, cir,vec);
              if(ans)
              {
                    for(int i=0;i<ans;i++)     // atan2 返回的極角范圍是-PI到PI
                    {
                        if(dcmp(angle(vec[i]))<0)
                        {
                            val[i]=(angle(vec[i])+PI)/PI*180;
                        }
                        else  val[i]=angle(vec[i])/PI*180;
                        if(dcmp(val[i]-180.0)==0) val[i]=0.0;
                    }

                sort(val,val+ans);
                printf("[");
                for(int i=0;i<ans-1;i++)
                printf("%.6f,",val[i]);
                printf("%.6f]\n",val[ans-1]);
              }
              else
              {
                  printf("[]\n");

              }
          }
          else if(!strcmp(str,"CircleThroughAPointAndTangentToALineWithRadius"))
          {
              Point p=read_point();
              Point A=read_point();
              Point B=read_point();
               double r;
              scanf("%lf",&r);

              Vector dir=B-A;
              Vector v1=normal(dir);
              Vector v2=rotate(v1, PI);

              Point p1=A+v1*r;
              Point p2=A+v2*r;

              Line L1=Line(p1,dir);
              Line L2=Line(p2,dir);

              vector<Point> sol;

               double t1=0,t2=0;

              int ans=getLineCircleIntersection(L1, Circle(p,r), t1, t2,sol);

              ans+=getLineCircleIntersection(L2, Circle(p,r), t1, t2, sol);

              if(!ans)
              {
                  printf("[]\n");

              }

              else
              {
                  sort(sol.begin(),sol.end());
                  printf("[");
                  for(int i=0;i<ans-1;i++)
                      printf("(%.6f,%.6f),",sol[i].x,sol[i].y);
                  printf("(%.6f,%.6f)]\n",sol[ans-1].x,sol[ans-1].y);
              }


          }

           else if(!strcmp(str,"CircleTangentToTwoLinesWithRadius"))
           {
               Point A1=read_point(),B1=read_point(),A2=read_point(),B2=read_point();

                double r;
               scanf("%lf",&r);


               Vector v1=B1-A1;
               Vector v2=B2-A2;

               Vector normal_1_1=normal(v1);
               Vector normal_1_2=rotate(normal_1_1, PI);

               Point  p1=A1+normal_1_1*r;
               Point  p2=A1+normal_1_2*r;
               
               Vector normal_2_1=normal(v2);
               Vector normal_2_2=rotate(normal_2_1, PI);

               Point  p3=A2+normal_2_1*r;
               Point  p4=A2+normal_2_2*r;
               
               vector<Point>  ans;

               ans.push_back(getLineIntersection(p1, v1, p3, v2));
               ans.push_back(getLineIntersection(p1, v1, p4, v2));

               ans.push_back(getLineIntersection(p2, v1, p3, v2));
               ans.push_back(getLineIntersection(p2, v1, p4, v2));

               sort(ans.begin(),ans.end());

               printf("[");
               for(int i=0;i<3;i++)
                   printf("(%.6f,%.6f),",ans[i].x,ans[i].y);

               printf("(%.6f,%.6f)]\n",ans[3].x,ans[3].y);

           }

           else if(!strcmp(str,"CircleTangentToTwoDisjointCirclesWithRadius"))
           {
               Circle A,B;
               A.c=read_point();
               scanf("%lf",&A.r);
               B.c=read_point();
               scanf("%lf",&B.r);

                double r;
               scanf("%lf",&r);

               vector<Point> ans;
               int cnt=getCircleCircleIntersection(Circle(A.c,A.r+r), Circle(B.c,B.r+r), ans);

               if(!cnt)
               {
                   printf("[]\n");
               }
               else
               {
               sort(ans.begin(),ans.end());

               printf("[");
               for(int i=0;i<cnt-1;i++)
                   printf("(%.6f,%.6f),",ans[i].x,ans[i].y);

               printf("(%.6f,%.6f)]\n",ans[cnt-1].x,ans[cnt-1].y);
               
               }
           }
    }
}
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 230,048評論 6 542
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 99,414評論 3 429
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 178,169評論 0 383
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,722評論 1 317
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 72,465評論 6 412
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 55,823評論 1 328
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,813評論 3 446
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 43,000評論 0 290
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 49,554評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 41,295評論 3 358
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 43,513評論 1 374
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 39,035評論 5 363
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 44,722評論 3 348
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 35,125評論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,430評論 1 295
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 52,237評論 3 398
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 48,482評論 2 379

推薦閱讀更多精彩內容

  • afinalAfinal是一個android的ioc,orm框架 https://github.com/yangf...
    passiontim閱讀 15,484評論 2 45
  • 今年7月份,在璐璐的指導下,我開始系統性地讀書,之所以這么說,是要同過去那種漫無目的、走馬觀花式的讀書區分開來。關...
    蕭蕭語歌閱讀 242評論 0 1