Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Init

  • Loading branch information...
commit 15784f55740fdc3d8e636b671b691ce2a38129d4 1 parent 3ee6b6a
@lockehamann authored
Showing with 7,722 additions and 1 deletion.
  1. BIN  Help.chm
  2. BIN  Kernel.dcu
  3. +85 −0 Kernel.pas
  4. BIN  MathFunction.dcu
  5. +1,121 −0 MathFunction.pas
  6. +173 −0 Project1.bdsproj
  7. +90 −0 Project1.bdsproj.local
  8. +38 −0 Project1.cfg
  9. +138 −0 Project1.dof
  10. +32 −0 Project1.dpr
  11. +490 −0 Project1.dsk
  12. BIN  Project1.exe
  13. BIN  Project1.res
  14. +9 −1 README.md
  15. BIN  StringLines.RES
  16. BIN  UAngle.dcu
  17. +95 −0 UAngle.pas
  18. BIN  UBaseFrame.dcu
  19. +80 −0 UBaseFrame.dfm
  20. +106 −0 UBaseFrame.pas
  21. BIN  UCalcClasses.dcu
  22. +1,647 −0 UCalcClasses.pas
  23. BIN  UCoordinates.dcu
  24. +66 −0 UCoordinates.pas
  25. BIN  UEquation.dcu
  26. +728 −0 UEquation.pas
  27. BIN  UFraction.dcu
  28. +107 −0 UFraction.pas
  29. BIN  UFrameInput.dcu
  30. +154 −0 UFrameInput.dfm
  31. +629 −0 UFrameInput.pas
  32. BIN  UGetInfo.dcu
  33. +157 −0 UGetInfo.pas
  34. BIN  UHAbout.dcu
  35. +81 −0 UHAbout.dfm
  36. +42 −0 UHAbout.pas
  37. BIN  UMain.dcu
  38. +142 −0 UMain.dfm
  39. +136 −0 UMain.pas
  40. BIN  URadical.dcu
  41. +958 −0 URadical.pas
  42. BIN  UTempF.dcu
  43. +82 −0 UTempF.dfm
  44. +79 −0 UTempF.pas
  45. BIN  UtoMathematica.dcu
  46. +104 −0 UtoMathematica.dfm
  47. +153 −0 UtoMathematica.pas
  48. BIN  无理数解析几何计算器开发文档.doc
View
BIN  Help.chm
Binary file not shown
View
BIN  Kernel.dcu
Binary file not shown
View
85 Kernel.pas
@@ -0,0 +1,85 @@
+unit kernel;
+
+interface
+uses
+ SysUtils;
+
+type
+ ECantSqrtKernel=class(EMathError);
+
+function GCD(const a ,b :Int64) : Int64;
+function SpeSqrt(const in1 :Int64): Int64;
+function LCM(const a ,b :Int64) : Int64;
+
+implementation
+
+function GCD(const a,b:Int64):Int64;
+//GreatestCommonDivisor 最大公约数
+var
+ aa,bb,cc:Int64;
+begin
+ aa:=Abs(a);
+ bb:=Abs(b);
+ if (aa < bb) then begin
+ cc:=aa;
+ aa:=bb;
+ bb:=cc;
+ end;
+ if bb=0 then begin
+ if aa=0 then
+ Result:=1
+ else
+ Result:=aa;
+ exit;
+ end;
+ while aa mod bb<>0 do begin
+ cc:=bb;
+ bb:=aa mod bb;
+ aa:=cc;
+ end;
+ Result:=bb;
+end;
+
+function LCM(const a,b:Int64):Int64;
+//LeaseCommonMultiple 最小公倍数
+begin
+ Result:=(a div GCD(a,b))*b;
+end;
+
+function SpeSqrt(const in1 :Int64): Int64;
+//SpeciallySqrt 特殊开方
+var
+ i,n:Int64;
+ temp1 :Smallint;
+ i2 :Integer;
+begin
+ if in1<0 then
+ raise ECantSqrtKernel.Create('被开方数不能为负'+#13#10+'错误发生在内核部分');
+ if in1<2 then begin
+ Result:=1;
+ exit;
+ end;
+ n:=in1;
+ temp1:=0;
+ While n and 3=0 do begin //n mod 4 =0
+ n:=n shr 2; //[/4]
+ Inc(temp1);
+ end;
+ Result:=1 shl temp1; //[2^temp1]
+ While n mod 9=0 do begin
+ n:=n div 9;
+ Result:=(Result shl 1)+Result;
+ end;
+ i:=5;
+ i2:=Trunc(Sqrt(in1*1.0))+1;
+ temp1:=2;
+ While i2>=i do
+ if n mod (i*i)=0 then begin
+ n:=n div (i*i);
+ Result:=Result*i;
+ end else begin
+ Inc(i,temp1);
+ temp1:=temp1 xor 6;//temp1:=6-temp1;
+ end;
+end;
+end.
View
BIN  MathFunction.dcu
Binary file not shown
View
1,121 MathFunction.pas
@@ -0,0 +1,1121 @@
+unit MathFunction;
+
+interface
+
+uses
+ SysUtils,
+ URadical,UCoordinates,UEquation,UAngle,UGetInfo;
+
+
+type
+ ESinError=class(EMathError);
+ EFocusOfError=class(EMathError);
+ ECreateParabolaEquE=class(EMathError);
+ ETangent=class(EMathError);
+ EParabolaTangentCE=class(EMathError);
+ ECreateSimpleEqu=class(Exception);
+ ESolveQuadricEquationInOneVariable=class(EMathError);
+ ESolveQuadricEquationInTwoVariableE=class(EMathError);
+ EIO=class(Exception); //输入数据不符合要求
+ ESEquationABeeline=class(EMathError);
+ ENormal=class(EMathError);
+ ESolveLinearEquations=class(EMathError);
+ ESolveLinearEquations1=class(EMathError);
+ EBeelineCurveOfSecondOrderChordLength=class(EMathError);
+ EFinishEqu=class(EMathError);
+ EFinishEquFull=class(EMathError);
+ ARadical=array of Radical;
+
+
+implementation
+
+procedure SwapC(var a:Coordinates);
+begin
+ Swap(a.x,a.y);
+end;
+
+procedure SwapEqu(var a:Equation);
+begin
+ Swap(a.r[1],a.r[2]);
+ Swap(a.r[4],a.r[6]);
+end;
+
+function MoveAxes(const a,NewOrigin:Coordinates;const kz:integer=2):Coordinates;
+//Origin 原点
+begin
+ Result.x:=CR(a.x,NewOrigin.x,kz);
+ Result.y:=CR(a.y,NewOrigin.y,kz);
+end;
+
+function CirPoint(const P,Origin:Coordinates;const Agl:Angle):Coordinates;
+//CircumvolvePoint旋转点
+var
+ temp:Coordinates;
+begin
+ temp:=MoveAxes(P,Origin);
+ Result.x:=CR(CR(temp.x,Agl.Cos,3),CR(temp.y,Agl.Sin ,3),2);
+ Result.y:=CR(CR(temp.x,Agl.Sin ,3),CR(temp.y,Agl.Cos ,3),1);
+ temp:=Origin;
+ ZeroMinus(temp.x);
+ ZeroMinus(temp.y);
+ Result:=MoveAxes(Result,temp);
+end;
+
+function FocusOfSE(const a,b:Equation):Coordinates;
+//FocusOfSimpleEquation 直线方程焦点
+const
+ op2:array[0..3] of Optype=(mult,subt,mult,divi);
+ br2:array[0..1] of integer=(1,-3);
+var
+ temp:Radical;
+ Exp:Expression;
+begin
+ if (a.EType <>etSimple) or (b.EType <>etSimple) then
+ raise EIO.Create('求直线方程焦点 函数:输入方程类型不对');
+ putob(Exp,cop1,[]);
+ putR(Exp,[@b.r[1],@a.r[2],@b.r[2],@a.r[1]]);
+ temp:=ExpCalc(Exp);
+ if GetVRad(temp)=0 then
+ raise EFocusOfError.Create('求直线方程焦点 函数:输入的两方程无焦点');
+ putob(Exp,op2,br2);
+ putR(Exp,[@b.r[2],@a.r[3],@a.r[2],@b.r[3],@temp]);
+ Result.x:=ExpCalc(Exp);
+ putR(Exp,[@a.r[1],@b.r[3],@b.r[1],@a.r[3],@temp]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function VLOSimpleEqu(const a:Equation;const b:Coordinates):Equation;
+//VerticalLineOfSimpleEquation 求直线方程的垂线
+var
+ Exp:Expression;
+begin
+ if a.EType <>etSimple then
+ raise EIO.Create('求直线方程的垂线 函数:输入方程的类型不对');
+ Result.r[1]:=FZeroMinus(a.r[2]);
+ Result.r[2]:=a.r[1];
+ putob(Exp,cop1,[]);
+ putR(Exp,[@a.r[1],@b.y,@a.r[2],@b.x]);
+ Result.r[3]:=FZeroMinus(ExpCalc(Exp));
+ ClearEqu(Result,4,6);
+ Result.EType :=etSimple;
+ PEqu(Result);
+end;
+
+function SPoint(const a:Equation;const b:Coordinates):Coordinates;
+//SymmetricPoint 对称点
+const
+ op1:array[0..8] of Optype=(mult,mult,addi,mult,addi,divi,powe,addi,powe);
+ br1:array[0..3] of integer=(2,-5,7,-9);
+ op2:array[0..1] of Optype=(subt,mult);
+var
+ temp:Radical;
+ Exp:Expression;
+begin
+ if a.EType <>etSimple then
+ raise EIO.Create('求已知点关于直线的对称点 函数:输入方程的类型不对');
+
+//temp=2*(A*x+B*y+C)/(A^2+B^2)
+ putob(Exp,op1,br1);
+ putR(Exp,[@csg2,@a.r[1],@b.x,@a.r[2],@b.y,@a.r[3],@a.r[1],@csg2,@a.r[2],@csg2]);
+ temp:=ExpCalc(Exp);
+
+//x'=x-temp*A y'=y-temp*B
+ putob(Exp,op2,[]);
+ PutR(Exp,[@b.x,@temp,@a.r[1]]);
+ Result.x:=ExpCalc(Exp);
+ PutR(Exp,[@b.y,@temp,@a.r[2]]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function CreateSimpleEqu(const a:array of Coordinates):Equation;
+//求作直线方程
+var
+ Exp:Expression;
+begin
+ if Length(a)<>2 then
+ raise EIO.Create('求作直线方程 函数:输入参数过多或过少');
+ Putob(Exp,cop1,[]);
+ PutR(Exp,[@a[0].x,@a[1].y,@a[0].y,@a[1].x]);
+ Result.r[3]:=ExpCalc(Exp);
+ Result.r[1]:=CR(a[0].y,a[1].y,2);
+ Result.r[2]:=CR(a[1].x,a[0].x,2);
+ if (GetVRad(Result.r[1])=0) and (GetVRad(Result.r[2])=0) then
+ raise ECreateSimpleEqu.Create('求作函数方程 函数:无法做出方程,原因可能是输入两点坐标相同');
+ ClearEqu(Result,4,6);
+ PEqu(Result);
+ Result.EType :=etSimple;
+end;
+
+
+function CreateRoundnessEquC(const a:array of Coordinates):Equation;
+//求作圆方程
+var
+ Det1:Det;
+ dtemp:integer;
+ temp:Infos;
+ Exp:Expression;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求作圆方程 函数:输入参数过多或过少');
+ SetLength(Det1,12);
+ PutOb(Exp,cop2,[]);
+ for dtemp:=0 to 2 do begin
+ Det1[dtemp*4]:=a[dtemp].x;
+ Det1[dtemp*4+1]:=a[dtemp].y;
+ Det1[dtemp*4+2]:=csg1;
+
+ //Det1[dtemp*4+3]=a[dtemp].x^2+a[dtemp].y^2
+ PutR(Exp,[@a[dtemp].x,@csg2,@a[dtemp].y,@csg2]);
+ Det1[dtemp*4+3]:=ExpCalc(Exp);
+ end;
+ try
+ temp:=SolveLinearEquations(Det1,3);
+ except
+ on ESolveLinearEquations do
+ raise ECreateParabolaEquE.Create('求作圆方程 函数:发生错误,无法做出方程');
+ end;
+ Result.r[1]:=FZeroMinus(temp.r[0]);
+ Result.r[2]:=FZeroMinus(temp.r[1]);
+ Result.r[3]:=FZeroMinus(temp.r[2]);
+ Result.r[4]:=csg1;
+ Result.r[6]:=csg1;
+ Result.r[5]:=csg0;
+ PEqu(Result);
+ Result.EType :=etRoundness;
+end;
+
+function CreateRoundEquCR(const a:Coordinates;const R:Radical):Equation;
+const
+ op:array[0..4] of Optype=(powe,addi,powe,subt,powe);
+var
+ Exp:Expression;
+begin
+ if GetVRad(R)<0 then
+ raise EIO.Create('求圆方程函数2:半径不能小于零');
+ Result.r[4]:=csg1;
+ Result.r[5]:=csg0;
+ Result.r[6]:=csg1;
+ Result.r[1]:=CR(a.x,csgm2,3);
+ Result.r[2]:=CR(a.y,csgm2,3);
+
+ //r[3]=x^2+y^2-temp2^2
+ PutOb(Exp,op,[]);
+ PutR(Exp,[@a.x,@csg2,@a.y,@csg2,@R,@csg2]);
+ Result.r[3]:=ExpCalc(Exp);
+ Result.EType :=etRoundness;
+end;
+
+
+function LengthOSOTriangle(const a:array of Coordinates):ARadical;
+//LengthOfSidesOfTriangle
+//三角形的边长
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形三边长 函数:输入参数过多或过少');
+ SetLength(Result,3);
+ Result[0]:=DisOCoo(a[0],a[1]);//c
+ Result[1]:=DisOCoo(a[0],a[2]);//b
+ Result[2]:=DisOCoo(a[2],a[1]);//a
+end;
+
+function TriangleBarycenter(const a:array of Coordinates):Coordinates;
+//三角形重心
+const
+ Op2:array[0..2] of Optype=(addi,addi,divi);
+ br2:array[0..1] of integer=(1,-2);
+ csg3:Radical=(r:(n:3;d:1));
+var
+ Exp:Expression;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形重心 函数:输入参数过多或过少');
+ //x:=(x1+x2+x3)/3
+ //y:=(y1+y2+y3)/3
+ PutOb(Exp,Op2,br2);
+ PutR(Exp,[@a[0].x,@a[1].x,@a[2].x,@csg3]);
+ Result.x:=ExpCalc(Exp);
+ PutR(Exp,[@a[0].y,@a[1].y,@a[2].y,@csg3]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function TriangleIncenter(const a:array of Coordinates):Coordinates;
+//三角形内心
+const
+ Op31:array[0..2] of Optype=(divi,addi,addi);
+ br31:array[0..1] of integer=(2,-3);
+ Op32:array[0..5] of Optype=(mult,addi,mult,addi,mult,mult);
+ br32:array[0..1] of integer=(1,-5);
+var
+ temp:ARadical;
+ temp1:Radical;
+ Exp:Expression;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形内心 函数:输入参数过多或过少');
+ temp:=LengthOSOTriangle(a);
+
+ //temp1=1/(a+b+c)
+ PutOb(Exp,Op31,br31);
+ PutR(Exp,[@csg1,@temp[0],@temp[1],@temp[2]]);
+ Temp1:=ExpCalc(Exp);
+
+ //x=(a*x1+b*x2+c*x3)*temp1
+ //y=(a*x1+b*x2+c*x3)*temp1
+ PutOb(Exp,Op32,br32);
+ PutR(Exp,[@temp[0],@a[0].x,@temp[1],@a[1].x,@temp[2],@a[2].x,@temp1]);
+ Result.x:=ExpCalc(Exp);
+ PutR(Exp,[@temp[0],@a[0].y,@temp[1],@a[1].y,@temp[2],@a[2].y,@temp1]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function TriangleCircumcenter(const a:array of Coordinates):Coordinates;
+//三角形外心
+var
+ D:Det;
+ dtemp:integer;
+ Exp:Expression;
+ temp:Radical;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形外心 函数:输入参数过多或过少');
+{ 采用公式计算:(公式是自己推的)
+ |x1^2+y1^2 y1 1|
+ |x2^2+y2^2 y2 1|
+ |x3^2+y3^2 y3 1|
+ x=---------------------
+ |x1 y1 1|
+ 2*|x2 y2 1|
+ |x3 y3 1|
+ ***********************************
+ |x1^2+y1^2 x1 1|
+ |x2^2+y2^2 x2 1|
+ |x3^2+y3^2 x3 1|
+ y=---------------------
+ |x1 y1 1|
+ (-2)*|x2 y2 1|
+ |x3 y3 1|
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |x1 y1 1|
+ temp= 2*|x2 y2 1|
+ |x3 y3 1|
+}
+ SetLength(D,9);
+ for dtemp:=0 to 2 do begin
+ D[dtemp*3+0]:=a[dtemp].x;
+ D[dtemp*3+1]:=a[dtemp].y;
+ D[dtemp*3+2]:=csg1;
+ end;
+ temp:=CDet(D);
+ Temp:=CR(temp,csg2,3);
+ putOb(Exp,cop2,[]);
+ for dtemp:=0 to 2 do begin
+ PutR(Exp,[@a[dtemp].x,@csg2,@a[dtemp].y,@csg2]);
+ D[dtemp*3]:=ExpCalc(Exp);
+ end;
+ Result.x:=CDet(D);
+ Result.x:=CR(Result.x,temp,4);
+ for dtemp:=0 to 2 do
+ D[dtemp*3+1]:=a[dtemp].x;
+ Result.y:=CDet(D);
+ ZeroMinus(Result.y);
+ Result.y:=CR(Result.y,temp,4);
+end;
+
+function TriangleOrthocenter(const a:array of Coordinates):Coordinates;
+//三角形垂心
+const
+ Op1:array[0..2] of Optype=(mult,addi,mult);
+var
+ D:Det;
+ dtemp:integer;
+ Exp:Expression;
+ temp:Radical;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形垂心 函数:输入参数过多或过少');
+{ 采用公式计算:(公式是自己推的)
+
+ |x2x3+y2y3 y1 1|
+ -1* |x3x1+y3y1 y2 1|
+ |x1x2+y1y2 y3 1|
+ x=---------------------
+ |x1 y1 1|
+ |x2 y2 1|
+ |x3 y3 1|
+ ***********************************
+ |x2x3+y2y3 x1 1|
+ |x3x1+y3y1 x2 1|
+ |x1x2+y1y2 x3 1|
+ y=---------------------
+ |x1 y1 1|
+ |x2 y2 1|
+ |x3 y3 1|
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |x1 y1 1|
+ temp= |x2 y2 1|
+ |x3 y3 1|
+}
+ SetLength(D,9);
+ for dtemp:=0 to 2 do begin
+ D[dtemp*3+0]:=a[dtemp].x;
+ D[dtemp*3+1]:=a[dtemp].y;
+ D[dtemp*3+2]:=csg1;
+ end;
+ temp:=CDet(D);
+ putOb(Exp,op1,[]);
+ for dtemp:=0 to 2 do begin
+ PutR(Exp,[@a[(dtemp+1)mod 3].x,@a[(dtemp+2)mod 3].x,@a[(dtemp+1)mod 3].y,@a[(dtemp+2)mod 3].y]);
+ D[dtemp*3]:=ExpCalc(Exp);
+ end;
+ Result.x:=CDet(D);
+ Result.x:=CR(Result.x,temp,4);
+ ZeroMinus(Result.x);
+ for dtemp:=0 to 2 do
+ D[dtemp*3+1]:=a[dtemp].x;
+ Result.y:=CDet(D);
+ Result.y:=CR(Result.y,temp,4);
+end;
+
+function TriangleAcreage(const a:array of Coordinates):Radical;
+//三角形面积
+var
+ D:Det;
+ dtemp:integer;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形面积 函数:输入参数过多或过少');
+ SetLength(D,9);
+ for dtemp:=0 to 2 do begin
+ D[dtemp*3+0]:=a[dtemp].x;
+ D[dtemp*3+1]:=a[dtemp].y;
+ D[dtemp*3+2]:=csg1;
+ end;
+ Result:=CDet(D);
+ Result:=CR(Result,csgf2,3);
+ if GetVRad(Result)<0 then
+ ZeroMinus(Result);
+end;
+
+function TriangleICR(const a:array of Coordinates):Radical;
+//TriangleInscribedCircleRadius
+//三角形内切圆半径
+const
+ op:array[0..3] of Optype=(divi,addi,addi,mult);
+ br:array[0..1] of integer=(2,-3);
+var
+ temp:ARadical;
+ S:Radical;
+ Exp:Expression;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形内切圆半径 函数:输入参数过多或过少');
+ temp:=LengthOSOTriangle(a);
+ S:=TriangleAcreage(a);
+ PutOb(Exp,op,br);
+ PutR(Exp,[@S,@temp[0],@temp[1],@temp[2],@csg2]);
+ Result:=ExpCalc(Exp);
+end;
+
+function TriangleICE(const a:array of Coordinates):Equation;
+//TriangleInscribedCircleEquation
+//三角形内切圆方程
+var
+ temp2:Radical;
+ R:Coordinates;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形内切圆半径 函数:输入参数过多或过少');
+ temp2:=TriangleICR(a);
+ R:=TriangleIncenter(a);
+ Result:=CreateRoundEquCR(R,temp2);
+end;
+
+function TriangleCR(const a:array of Coordinates):Radical;
+//TriangleCircumradius
+//三角形外接圆半径
+const
+ op:array[0..3] of Optype=(mult,mult,mult,divi);
+ csgf4:Radical=(r:(n:1;d:4));
+var
+ temp:ARadical;
+ S:Radical;
+ Exp:Expression;
+begin
+ if Length(a)<>3 then
+ raise EIO.Create('求三角形外接圆半径 函数:输入参数过多或过少');
+ temp:=LengthOSOTriangle(a);
+ S:=TriangleAcreage(a);
+ PutOb(Exp,op,[]);
+ PutR(Exp,[@temp[0],@temp[1],@temp[2],@csgf4,@S]);
+ Result:=ExpCalc(Exp);
+end;
+
+function CreateRoundEquC2(const a:array of Coordinates):Equation;
+//已知圆心和圆上一点求圆方程
+//第一个点是圆心
+
+begin
+ Result.r[4]:=csg1;
+ Result.r[5]:=csg0;
+ Result.r[6]:=csg1;
+ Result.r[1]:=CR(a[0].x,csgm2,3);
+ Result.r[2]:=CR(a[0].y,csgm2,3);
+ FinishEqu(Result,[a[1]],[3]);
+ Result.EType :=etRoundness;
+end;
+
+procedure FinishEqu(var a:Equation;const c:array of Coordinates;const b:array of Byte);
+//用待定系数法补全方程
+ function Calc1(const a:Coordinates;const e:Equation;const b:Byte):Radical;
+ const
+ op1:array[0..1] of OpType=(mult,powe);
+ op11:array[0..1] of OpType=(mult,mult);
+ var
+ Exp:Expression;
+ begin
+ if b=1 then
+ Result:=CR(e.r[1],a.x,3)
+ else if b =2 then
+ Result:=CR(e.r[2],a.y,3)
+ else if b=3 then begin
+ Result:=csg1;
+ end else if b=4 then begin
+ PutOb(Exp,op1,[]);
+ PutR(Exp,[@e.r[4],@a.x,@csg2]);
+ Result:=ExpCalc(Exp);
+ end else if b=6 then begin
+ if b<>4 then
+ PutOb(Exp,op1,[]);
+ PutR(Exp,[@e.r[6],@a.y,@csg2]);
+ Result:=ExpCalc(Exp);
+ end else if b=5 then begin
+ PutOb(Exp,op11,[]);
+ PutR(Exp,[@e.r[5],@a.x,@a.y]);
+ Result:=ExpCalc(Exp);
+ end;
+ end;
+ function Calc2(const a:Coordinates;const b:Byte):Radical;
+ begin
+ if b=1 then
+ Result:=a.x
+ else if b =2 then
+ Result:=a.y
+ else if b=3 then begin
+ Result:=csg1;
+ end else if b=4 then
+ Result:=CR(a.x,csg2,5)
+ else if b=6 then
+ Result:=CR(a.y,csg2,5)
+ else if b=5 then
+ Result:=CR(a.x,a.y,3);
+ end;
+var
+ temp:Infos;
+ sb:set of Byte;
+ dtemp,dtemp1,index:integer;
+ d:Det;
+begin
+ if (Length(b)>5) or (Length(b)<1) then
+ raise EIO.Create('用待定系数法补全方程 函数:待定系数过多或过少');
+ if (Length(b)<>Length(c)) then
+ raise EIO.Create('用待定系数法补全方程 函数:待定系数个数与已知点个数不同');
+ for dtemp:=0 to Length(b)-1 do
+ Sb:=sb+[b[dtemp]];
+ SetLength(d,Length(b)*(Length(b)+1));
+ for dtemp1:=0 to Length(b)-1 do begin
+ index:=0;
+ d[(dtemp1+1)*(Length(b)+1)-1]:=csg0;
+ for dtemp:=1 to 6 do
+ if not (dtemp in sb) then
+ d[(dtemp1+1)*(Length(b)+1)-1]:=CR(d[(dtemp1+1)*(Length(b)+1)-1],CR(Calc1(c[dtemp1],a,dtemp),a.r[dtemp],3),1)
+ else begin
+ d[dtemp1*(Length(b)+1)+index]:=Calc2(c[dtemp1],dtemp);
+ Inc(index);
+ end;
+ ZeroMinus(d[(dtemp1+1)*(Length(b)+1)-1]);
+ end;
+ try
+ temp:=SolveLinearEquations(d,Length(b));
+ except
+ on ESolveLinearEquations do
+ if Length(b)=2 then begin
+ a.r[b[0]]:=d[0];
+ a.r[b[1]]:=FZeroMinus(d[1]);
+ PEqu(a);
+ exit;
+ end else
+ raise EFinishEqu.Create('待定系数法补全方程 函数:暂时无法处理这种情况');
+ end;
+ index:=0;
+ for dtemp:=1 to 6 do
+ if dtemp in sb then begin
+ a.r[dtemp]:=temp.r[index];
+ Inc(index);
+ end;
+ PEqu(a);
+end;
+
+function RoundnessCentre(const a:Equation):Coordinates;
+//求圆心
+const
+ op:array[0..1] of OpType=(divi,mult);
+var
+ Exp:Expression;
+begin
+ //算法很简单,略
+ PutOb(Exp,op,[]);
+ PutR(Exp,[@a.r[1],@a.r[4],@csgmf2]);
+ Result.x:=ExpCalc(Exp);
+ PutR(Exp,[@a.r[2],@a.r[6],@csgmf2]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function RoundnessR(const a:Equation):Radical;
+//求圆半径
+const
+ op:array[0..6] of OpType=(subt,addi,powe,addi,powe,divi,powe);
+ br:array[0..3] of integer=(1,3,-5,-6);
+var
+ Exp:Expression;
+begin
+ //Result=Sqrt(-r[3]+(r[1]^2+r[2]^2)/4)
+ PutOb(Exp,op,br);
+ PutR(Exp,[@csg0,@a.r[3],@a.r[1],@csg2,@a.r[2],@csg2,@csg4,@csgf2]);
+ Result:=ExpCalc(Exp);
+end;
+
+function DisBCE(const a:Coordinates;const b:Equation):Radical;
+//DistanceBetweenCoordinateEquation
+//点到直线距离
+const
+ op:array[0..8] of Optype=(mult,addi,mult,addi,divi,powe,addi,powe,powe);
+ br:array[0..3] of integer=(1,-4,6,-8);
+var
+ Exp:Expression;
+begin
+ //d=(A*x+B*y+C)/(A^2+b^2)^(1/2)
+ PutOb(Exp,op,br);
+ PutR(Exp,[@b.r[1],@a.x,@b.r[2],@a.y,@b.r[3],@b.r[1],@csg2,@b.r[2],@csg2,@csgf2]);
+ Result:=ExpCalc(Exp);
+ if GetVRad(Result)<0 then
+ ZeroMinus(Result);
+end;
+
+function PointODivision(const a:array of Coordinates;const la:Radical):Coordinates;
+//线段定比分点
+const
+ op:array[0..3] of OpType=(addi,mult,divi,addi);
+ br:array[0..3] of integer=(1,-2,4,-4);
+var
+ Exp:Expression;
+begin
+ //x=(x1+x2*la)/(1+la)
+ //y=(y1+y2*la)/(1+la)
+ if Length(a)<>2 then
+ raise EIO.Create('线段定比分点 函数:输入参数过多或过少');
+ if GetVRad(la)=-1 then
+ raise EIO.Create('线段定比分点 函数:比值不能为-1');
+ putOb(Exp,op,br);
+ PutR(Exp,[@a[0].x,@a[1].x,@la,@csg1,@la]);
+ Result.x:=ExpCalc(Exp);
+ PutR(Exp,[@a[0].y,@a[1].y,@la,@csg1,@la]);
+ Result.y:=ExpCalc(Exp);
+end;
+
+function IfOnEquation(const a:Equation;const c:Coordinates):Boolean;
+//判断点是否在方程上
+const
+ op:array[0..12] of OpType=(mult,addi,mult,addi,addi,mult,powe,addi,mult,mult,addi,mult,powe);
+var
+ Exp:Expression;
+ temp:Radical;
+begin
+ PutOb(Exp,op,[]);
+ PutR(Exp,[@a.r[1],@c.x,@a.r[2],@c.y,@a.r[3],@a.r[4],@c.x,@csg2,@a.r[5],@c.x,@c.y,@a.r[6],@c.y,@csg2]);
+ temp:=ExpCalc(Exp);
+ if GetVRad(temp)=0 then
+ Result:=True
+ else
+ Result:=False;
+end;
+
+function Tangent(const a:Equation;const c:Coordinates):Equation;
+//求切线函数
+const
+ op:array[0..4] of OpType=(mult,mult,addi,mult,addi);
+ op1:array[0..4] of OpType=(mult,addi,mult,addi,mult);
+var
+ Exp:Expression;
+begin
+ if a.EType in [etSimple,etNone] then
+ raise EIO.Create('求方程切线 函数:不能求直线方程上的切线');
+//算法:
+//把 x^2 y^2 替换为 x*x0 y*y0
+//xy 替换为 1/2(y*x0+x*y0)
+//x y 替换为 1/2(x+x0) 1/2(y+y0)
+ PutOb(Exp,op,[]);
+ PutR(Exp,[@csg2,@a.r[4],@c.x,@a.r[5],@c.y,@a.r[1]]);
+ Result.r[1]:=ExpCalc(Exp);
+ PutR(Exp,[@csg2,@a.r[6],@c.y,@a.r[5],@c.x,@a.r[2]]);
+ Result.r[2]:=ExpCalc(Exp);
+ PutOb(Exp,op1,[]);
+ PutR(Exp,[@a.r[1],@c.x,@a.r[2],@c.y,@csg2,@a.r[3]]);
+ Result.r[3]:=ExpCalc(Exp);
+ ClearEqu(Result,4,6);
+ PEqu(Result);
+ Result.EType :=etSimple;
+end;
+
+function RoundnessTangentK(const a:Equation;const k:Radical):Infos;
+//求 已知斜率的圆的切线
+const
+ op:array[0..3] of Optype=(mult,powe,addi,powe);
+ br:array[0..1] of integer=(2,-3);
+var
+ Exp:Expression;
+ R:Radical;
+begin
+ if a.EType <>etRoundness then
+ raise EIO.Create('求圆的切线 函数:输入的方程不是圆方程');
+ R:=RoundnessR(a);
+
+ //y=kx+r*sqrt(k^2+1)
+ //y=kx-r*sqrt(k^2+1)
+ SetLength(Result.e,2);
+ PutOb(Exp,op,br);
+ PutR(Exp,[@R,@k,@csg2,@csg1,@csgf2]);
+ Result.e[0].r[3]:=ExpCalc(Exp);
+ Result.e[1].r[3]:=FZeroMinus(Result.e[0].r[3]);
+ Result.e[0].r[1]:=k;
+ Result.e[1].r[1]:=k;
+ Result.e[0].r[2]:=csgm1;
+ Result.e[1].r[2]:=csgm1;
+ ClearEqu(Result.e[0],4,6);
+ ClearEqu(Result.e[1],4,6);
+ PEqu(Result.e[0]);
+ PEqu(Result.e[1]);
+end;
+
+function PolygonAcreage(const a:array of Coordinates):Radical;
+//凸多边形面积
+var
+ dtemp:integer;
+ temp:Radical;
+begin
+ Result:=csg0;
+ for dtemp:=0 to High(a)-1 do begin
+ temp:=CR(a[dtemp].x,a[dtemp+1].y,3);
+ Result:=CR(Result,temp,1);
+ end;
+ temp:=CR(a[0].y,a[High(a)].x,3);
+ Result:=CR(Result,temp,1);
+ for dtemp:=0 to High(a)-1 do begin
+ temp:=CR(a[dtemp].y,a[dtemp+1].x,3);
+ Result:=CR(Result,temp,2);
+ end;
+ temp:=CR(a[0].x,a[High(a)].y,3);
+ Result:=CR(Result,temp,2);
+ Result:=CR(Result,csgf2,3);
+ if GetVRad(Result)<0 then
+ ZeroMinus(Result);
+end;
+
+function ParabolaVertexE(const a:Equation):Coordinates;
+//抛物线顶点 (对称轴平行于y轴或x轴)
+const
+ csgf4:Radical=(r:(n:1;d:4));
+var
+ aa:Equation;
+
+ function ParabolaVertexEE(const a:Equation):Coordinates;
+ //抛物线顶点 (对称轴平行于y轴)
+ const
+ op1:array[0..1] of Optype=(divi,mult);
+ op2:array[0..4] of Optype=(subt,powe,mult,divi,divi);
+ br2:array[0..1] of integer=(1,-4);
+ var
+ Exp:Expression;
+ begin
+ if (GetVRad(a.r[4])=0) or (GetVRad(a.r[2])=0) then
+ raise EIO.Create('抛物线顶点 函数:输入的方程不是抛物线');
+ PutOb(Exp,op1,[]);
+ PutR(Exp,[@a.r[1],@a.r[4],@csgmf2]);
+ Result.x:=ExpCalc(Exp);
+ PutOb(Exp,op2,br2);
+ PutR(Exp,[@a.r[3],@a.r[1],@csg2,@csgf4,@a.r[4],@a.r[2]]);
+ Result.y:=ExpCalc(Exp);
+ ZeroMinus(Result.y);
+ end;
+
+begin
+ if a.EType <>etParabola then
+ raise EIO.Create('抛物线顶点 函数:输入的方程不是抛物线');
+ if (GetVRad(a.r[6])=0) and (GetVRad(a.r[4])<>0) then
+ Result:=ParabolaVertexEE(a)
+ else if (GetVRad(a.r[4])=0) and (GetVRad(a.r[6])<>0) then begin
+ ECopy(aa,a);
+ SwapEqu(aa);
+ Result:=ParabolaVertexEE(aa);
+ SwapC(Result);
+ end;
+end;
+
+function ParabolaDirectrixFocusE(const a:Equation):Infos;
+//抛物线准线和焦点 (对称轴平行于y轴或x轴)
+var
+ aa:Equation;
+
+ function ParabolaDirectrixFocusEE(const a:Equation):Infos;
+ //抛物线准线和焦点 (对称轴平行于y轴)
+ const
+ csgmf4:Radical=(r:(n:-1;d:4));
+ var
+ p,temp:Radical;
+ o:Coordinates;
+ begin
+ p:=CR(a.r[2],a.r[4],4);
+ p:=CR(p,csgmf4,3);
+ temp:=CR(a.r[4],a.r[2],4);
+ o:=ParabolaVertexE(a);
+ SetLEngth(Result.e,1);
+ SetLength(Result.c,1);
+ Result.e[0].r[3]:=CR(o.y,p,2);
+ Result.c[0].y:=CR(o.y,p,1);
+ ZeroMinus(Result.e[0].r[3]);
+ Result.c[0].x:=o.x;
+ Result.e[0].r[2]:=csg1;
+ Result.e[0].r[1]:=csg0;
+ ClearEqu(Result.e[0],4,6);
+ Result.e[0].EType :=etSimple;
+ PEqu(Result.e[0]);
+ end;
+
+begin
+ if a.EType <>etParabola then
+ raise EIO.Create('求抛物线准线 函数:输入的方程不是抛物线');
+ if (GetVRad(a.r[6])=0) and (GetVRad(a.r[4])<>0) then
+ Result:=ParabolaDirectrixFocusEE(a)
+ else if (GetVRad(a.r[4])=0) and (GetVRad(a.r[6])<>0) then begin
+ ECopy(aa,a);
+ SwapEqu(aa);
+ Result:=ParabolaDirectrixFocusEE(aa);
+ SwapEqu(Result.e[0]);
+ SwapC(Result.c[0]);
+ end;
+end;
+
+function SolveQuadricEquationInOneVariable(const a:Equation):Infos;
+//解一元二次方程
+const
+ op1:array[0..3] of Optype=(powe,subt,mult,mult);
+ op2:array[0..2] of Optype=(subt,mult,divi);
+ br2:array[0..1] of integer=(1,-1);
+var
+ aa:Equation;
+ temp:Radical;
+ Exp:Expression;
+begin
+ //算法很简单,用公式,略
+ if GetVRad(a.r[4])=0 then begin
+ ECopy(aa,a);
+ SwapEqu(aa);
+ if GetVRad(a.r[4])=0 then
+ raise EIO.Create('解一元二次方程 函数:输入的不是二次方程');
+ end;
+ if GetVRad(a.r[2])<>0 then
+ raise EIO.Create('解一元二次方程 函数:输入的不是一元方程');
+ //temp:=Sqrt(b^2-4ac)
+ PutOb(Exp,op1,[]);
+ PutR(Exp,[@a.r[1],@csg2,@csg4,@a.r[4],@a.r[3]]);
+ temp:=ExpCalc(Exp);
+ if GetVRad(temp)<0 then
+ raise ESolveQuadricEquationInOneVariable.Create('解一元二次方程 函数:方程的△<0');
+ temp:=CR(temp,csgf2,5);
+ SetLength(Result.r,2);
+ PutOb(Exp,op2,br2);
+ PutR(Exp,[@temp,@a.r[1],@csgf2,@a.r[4]]);
+ Result.r[0]:=ExpCalc(Exp);
+ ZeroMinus(temp);
+ Result.r[1]:=ExpCalc(Exp);
+end;
+
+function SolveQuadricEquationInTwoVariableE(const aa,bb:Equation):Infos;
+//解简单二元二次方程组
+const
+ op:array[0..2] of Optype=(mult,addi,divi);
+ br:array[0..1] of integer=(1,-2);
+var
+ temp:array of Radical;
+ a,b:Equation;
+ etemp:Equation;
+ itemp:Infos;
+ Exp:Expression;
+ kz:Boolean;
+begin
+ //把 简单二元二次方程组 化为一元二次方程 求解
+ if aa.EType =etSimple then begin
+ b:=aa;
+ a:=bb;
+ end else if bb.EType =etSimple then begin
+ a:=aa;
+ b:=bb;
+ end else
+ raise EIO.Create('解简单二元二次方程组 函数:只能解含有一个一次方程的二元二次方程组');
+ if a.EType in [etSimple,etNone] then
+ raise EIO.Create('解简单二元二次方程组 函数:输入的不是二元二次方程组');
+ SetLength(temp,6);
+ if GetVRad(b.r[2])<>0 then begin
+ //消去x
+ kz:=True;
+ temp[0]:=csg1;
+ temp[1]:=csg0;
+ temp[2]:=csg0;
+ temp[3]:=CR(b.r[1],b.r[2],4);
+ ZeroMinus(temp[3]);
+ temp[4]:=csg0;
+ temp[5]:=CR(b.r[3],b.r[2],4);
+ ZeroMinus(temp[5]);
+ end else begin
+ //消去y
+ kz:=False;
+ temp[3]:=csg1;
+ temp[4]:=csg0;
+ temp[5]:=csg0;
+ temp[0]:=csg0;
+ temp[1]:=CR(b.r[2],b.r[1],4);
+ ZeroMinus(temp[1]);
+ temp[2]:=CR(b.r[3],b.r[1],4);
+ ZeroMinus(temp[2]);
+ end;
+ Etemp:=ReplacePolynomial(a,temp);
+ try
+ Itemp:=SolveQuadricEquationInOneVariable(Etemp);
+ except
+ on ESolveQuadricEquationInOneVariable do
+ raise ESolveQuadricEquationInTwoVariableE.Create('解简单二元二次方程组 函数:方程组无实数解');
+ end;
+ SetLength(Result.c,2);
+ if kz then begin
+ Result.c[0].x:=Itemp.r[0];
+ //Result.c[0].y=-(b.r[1]*Itemp.r[0] + b.r[3])/b.r[2]
+ PutOb(Exp,op,br);
+ PutR(Exp,[@b.r[1],@Itemp.r[0],@b.r[3],@b.r[2]]);
+ Result.c[0].y:=ExpCalc(Exp);
+ ZeroMinus(Result.c[0].y);
+
+ Result.c[1].x:=Itemp.r[1];
+ //Result.c[1].y=-(b.r[1]*Itemp.r[1] + b.r[3])/b.r[2]
+ PutOb(Exp,op,br);
+ Exp.Rad[1]:=@Itemp.r[1];
+ Result.c[1].y:=ExpCalc(Exp);
+ ZeroMinus(Result.c[1].y);
+ end else begin
+ Result.c[0].y:=Itemp.r[0];
+ //Result.c[0].x=-(b.r[2]*Itemp.r[0] + b.r[3])/b.r[1]
+ PutOb(Exp,op,br);
+ PutR(Exp,[@b.r[2],@Itemp.r[0],@b.r[3],@b.r[1]]);
+ Result.c[0].x:=ExpCalc(Exp);
+ ZeroMinus(Result.c[0].x);
+
+ Result.c[1].y:=Itemp.r[1];
+ //Result.c[1].x=-(b.r[2]*Itemp.r[1] + b.r[3])/b.r[1]
+ PutOb(Exp,op,br);
+ Exp.Rad[1]:=@Itemp.r[1];
+ Result.c[1].x:=ExpCalc(Exp);
+ ZeroMinus(Result.c[1].x);
+ end;
+end;
+
+function TangentO(const a:Equation;const c:Coordinates):Infos;
+//过曲线外一点作圆锥曲线方程的切线
+var
+ temp:Equation;
+begin
+ //算法
+ //先求切点 再求切线
+ //切点在已知方程上,又在过切点的切线上(切线可以通过已知点求得,切线恰好与把一点代入Tangent的结果相同)
+ if a.EType in [etSimple,etNone] then
+ raise EIO.Create('过直线外一点作圆锥曲线方程的切线 函数:输入的不是圆锥曲线方程');
+ temp:=Tangent(a,c);
+ try
+ Result:=SolveQuadricEquationInTwoVariableE(a,temp);
+ except
+ on ESolveQuadricEquationInTwoVariableE do
+ raise ETangent.Create('过直线外一点作圆锥曲线方程的切线 函数:点在图像内,没有切线');
+ end;
+ SetLength(Result.e,2);
+ Result.e[0]:=CreateSimpleEqu([Result.c[0],c]);
+ Result.e[1]:=CreateSimpleEqu([Result.c[1],c]);
+ SetLength(Result.c,0);
+end;
+
+function SEquationAPoint(const c:Coordinates;const a:Equation):Equation;
+//SymmetricEquationAboutPoint
+//求方程关于一点的对称方程
+var
+ temp:array of Radical;
+begin
+ SetLength(temp,6);
+ temp[0]:=csgm1;
+ temp[1]:=csg0;
+ temp[2]:=CR(csg2,c.x,3);
+ temp[3]:=csg0;
+ temp[4]:=csgm1;
+ temp[5]:=CR(csg2,c.y,3);
+ Result:=ReplacePolynomial(a,temp);
+end;
+
+function SEquationABeeline(const a,Beeline:Equation):Equation;
+//SymmetricEquationAboutBeeline
+//求方程关于直线的对称方程
+const
+ op1:array[0..3] of Optype=(divi,powe,addi,powe);
+ br1:array[0..1] of integer=(2,-4);
+ op2:array[0..3] of Optype=(subt,mult,powe,mult);
+ op3:array[0..2] of Optype=(mult,mult,mult);
+var
+ Exp:expression;
+ temp:Radical;
+ tempR:array of Radical;
+begin
+ if Beeline.EType <>etSimple then
+ raise ESEquationABeeline.Create('求方程关于直线的对称方程 函数:对称轴必须是直线');
+ //temp:=1/(Beeline.r[1]^2+Beeline.r[2]^2);
+ PutOb(Exp,op1,br1);
+ PutR(Exp,[@csg1,@Beeline.r[1],@csg2,@Beeline.r[2],@csg2]);
+ temp:=ExpCalc(Exp);
+
+ SetLength(tempR,6);
+
+ //temp[0]:=1-2*Beeline.r[1]^2*temp
+ PutOb(Exp,op2,[]);
+ PutR(Exp,[@csg1,@csg2,@Beeline.r[1],@csg2,@temp]);
+ tempR[0]:=ExpCalc(Exp);
+
+ //temp[1]:=-2*Beeline.r[1]*Beeline.r[2]*temp
+ PutOb(Exp,op3,[]);
+ PutR(Exp,[@csgm2,@Beeline.r[1],@Beeline.r[2],@temp]);
+ tempR[1]:=ExpCalc(Exp);
+
+ //temp[2]:=-2*Beeline.r[1]*Beeline.r[3]*temp
+ PutR(Exp,[@csgm2,@Beeline.r[1],@Beeline.r[3],@temp]);
+ tempR[2]:=ExpCalc(Exp);
+
+ //temp[5]:=-2*Beeline.r[2]*Beeline.r[3]*temp
+ PutR(Exp,[@csgm2,@Beeline.r[2],@Beeline.r[3],@temp]);
+ tempR[5]:=ExpCalc(Exp);
+
+ tempR[3]:=tempR[1];
+
+ //temp[4]:=1-2*Beeline.r[2]^2*temp
+ PutOb(Exp,op2,[]);
+ PutR(Exp,[@csg1,@csg2,@Beeline.r[2],@csg2,@temp]);
+ tempR[4]:=ExpCalc(Exp);
+
+ Result:=ReplacePolynomial(a,tempR);
+end;
+
+function Normal(const a:Equation;const c:Coordinates):Equation;
+//过曲线上一点作曲线的法线
+begin
+//先求切线,再求法线
+ if IfOnEquation(a,c) then begin
+ Result:=Tangent(a,c);
+ Result:=VLOSimpleEqu(Result,c);
+ end else
+ raise ENormal.Create('过曲线上一点作曲线的法线 函数:点不在曲线方程上');
+end;
+
+function SolveLinearEquations(const a:Det;const num:integer):Infos;
+//解非齐次线性方程组
+var
+ dettemp:Det;
+ rtemp:array of Radical;
+ dtemp,dtemp1:integer;
+ temp,temp1:Radical;
+begin
+ //本函数按线性代数中的一般方法解线性方程组
+ if Length(a)<>num*(num+1) then
+ raise EIO.Create('解线性方程组 函数:输入的数据个数有误');
+ SetLength(dettemp,num*num);
+ for dtemp:=0 to num-1 do
+ for dtemp1:=0 to num-1 do
+ dettemp[dtemp*num+dtemp1]:=a[dtemp*(num+1)+dtemp1];
+ temp:=CDet(dettemp);
+ if GetVRad(temp)=0 then begin
+ SetLength(rtemp,num);
+ for dtemp:=0 to num-1 do begin
+ for dtemp1:=0 to num-1 do begin
+ rtemp[dtemp1]:=dettemp[dtemp1*num+dtemp];
+ dettemp[dtemp1*num+dtemp]:=a[dtemp1*(num+1)+num];
+ end;
+ temp1:=CDet(dettemp);
+ if GetVRad(temp1)<>0 then
+ raise ESolveLinearEquations1.Create('解线性方程组 函数:方程组没有实数解');
+ end;
+ raise ESolveLinearEquations.Create('解线性方程组 函数:方程组有无数组解');
+ end;
+ SetLength(rtemp,num);
+ SetLength(Result.r,num);
+ for dtemp:=0 to num-1 do begin
+ for dtemp1:=0 to num-1 do begin
+ rtemp[dtemp1]:=dettemp[dtemp1*num+dtemp];
+ dettemp[dtemp1*num+dtemp]:=a[dtemp1*(num+1)+num];
+ end;
+ temp1:=CDet(dettemp);
+ Result.r[dtemp]:=CR(temp1,temp,4);
+ for dtemp1:=0 to num-1 do
+ dettemp[dtemp1*num+dtemp]:=rtemp[dtemp1];
+ end;
+end;
+
+function BeelineCurveOfSecondOrderChordLength(const a:Infos):Radical;
+//直线和圆锥曲线相交弦 弦长
+//CurveOfSecondOrder 圆锥曲线
+//ChordLength 弦长
+var
+ i:Infos;
+begin
+ if High(a.e)<>1 then
+ raise EIO.Create('求 直线和圆锥曲线相交弦弦长 函数:必须输入两个方程');
+ if (a.e[0].EType=etSimple) and (a.e[1].EType=etSimple) then
+ raise EIO.Create('求 直线和圆锥曲线相交弦弦长 函数:输入的是两条直线,没有相交弦')
+ else if (a.e[0].EType<>etSimple) and (a.e[1].EType<>etSimple) then
+ raise EIO.Create('求 直线和圆锥曲线相交弦弦长 函数:输入的方程中必须有一个是直线方程');
+ try
+ i:=SolveQuadricEquationInTwoVariableE(a.e[0],a.e[1]);
+ except
+ on ESolveQuadricEquationInTwoVariableE do
+ raise EBeelineCurveOfSecondOrderChordLength.Create('求 直线和圆锥曲线相交弦弦长 函数:曲线和直线没有焦点');
+ end;
+ Result:=DisOCoo(i.c[0],i.c[1]);
+end;
+
+function FinishEquFull(const a:Infos;const abb:array of Byte):Equation;
+//用待定系数法求整个方程
+var
+ dtemp,dtemp1:integer;
+ ab:array of Byte;
+begin
+ for dtemp:=0 to High(abb) do begin
+ ClearEqu(Result,1,6);
+ SetLength(ab,0);
+ Result.r[abb[dtemp]]:=csg1;
+ for dtemp1:=0 to High(abb) do
+ if dtemp1<>dtemp then begin
+ SetLength(ab,High(ab)+2);
+ ab[High(ab)]:=abb[dtemp1];
+ end;
+ try
+ FinishEqu(Result,a.c,ab);
+ except
+ on Exception do
+ Continue;
+ end;
+ Break;
+ end;
+ if dtemp=Length(abb) then
+ raise EFinishEquFull.Create('用待定系数法求方程2 函数:无法作出方程');
+end;
+
+end.
View
173 Project1.bdsproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+ <PersonalityInfo>
+ <Option>
+ <Option Name="Personality">Delphi.Personality</Option>
+ <Option Name="ProjectType">VCLApplication</Option>
+ <Option Name="Version">1.0</Option>
+ <Option Name="GUID">{3D04D944-5442-448F-839C-3DDA3EC1BC2A}</Option>
+ </Option>
+ </PersonalityInfo>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">Project1.dpr</Source>
+ </Source>
+ <FileVersion>
+ <FileVersion Name="Version">7.0</FileVersion>
+ </FileVersion>
+ <Compiler>
+ <Compiler Name="A">8</Compiler>
+ <Compiler Name="B">0</Compiler>
+ <Compiler Name="C">1</Compiler>
+ <Compiler Name="D">1</Compiler>
+ <Compiler Name="E">0</Compiler>
+ <Compiler Name="F">0</Compiler>
+ <Compiler Name="G">1</Compiler>
+ <Compiler Name="H">1</Compiler>
+ <Compiler Name="I">1</Compiler>
+ <Compiler Name="J">0</Compiler>
+ <Compiler Name="K">0</Compiler>
+ <Compiler Name="L">1</Compiler>
+ <Compiler Name="M">0</Compiler>
+ <Compiler Name="N">1</Compiler>
+ <Compiler Name="O">1</Compiler>
+ <Compiler Name="P">1</Compiler>
+ <Compiler Name="Q">0</Compiler>
+ <Compiler Name="R">0</Compiler>
+ <Compiler Name="S">0</Compiler>
+ <Compiler Name="T">0</Compiler>
+ <Compiler Name="U">0</Compiler>
+ <Compiler Name="V">1</Compiler>
+ <Compiler Name="W">0</Compiler>
+ <Compiler Name="X">1</Compiler>
+ <Compiler Name="Y">1</Compiler>
+ <Compiler Name="Z">1</Compiler>
+ <Compiler Name="ShowHints">True</Compiler>
+ <Compiler Name="ShowWarnings">True</Compiler>
+ <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
+ <Compiler Name="NamespacePrefix"></Compiler>
+ <Compiler Name="GenerateDocumentation">False</Compiler>
+ <Compiler Name="DefaultNamespace"></Compiler>
+ <Compiler Name="SymbolDeprecated">True</Compiler>
+ <Compiler Name="SymbolLibrary">True</Compiler>
+ <Compiler Name="SymbolPlatform">True</Compiler>
+ <Compiler Name="SymbolExperimental">True</Compiler>
+ <Compiler Name="UnitLibrary">True</Compiler>
+ <Compiler Name="UnitPlatform">True</Compiler>
+ <Compiler Name="UnitDeprecated">True</Compiler>
+ <Compiler Name="UnitExperimental">True</Compiler>
+ <Compiler Name="HResultCompat">True</Compiler>
+ <Compiler Name="HidingMember">True</Compiler>
+ <Compiler Name="HiddenVirtual">True</Compiler>
+ <Compiler Name="Garbage">True</Compiler>
+ <Compiler Name="BoundsError">True</Compiler>
+ <Compiler Name="ZeroNilCompat">True</Compiler>
+ <Compiler Name="StringConstTruncated">True</Compiler>
+ <Compiler Name="ForLoopVarVarPar">True</Compiler>
+ <Compiler Name="TypedConstVarPar">True</Compiler>
+ <Compiler Name="AsgToTypedConst">True</Compiler>
+ <Compiler Name="CaseLabelRange">True</Compiler>
+ <Compiler Name="ForVariable">True</Compiler>
+ <Compiler Name="ConstructingAbstract">True</Compiler>
+ <Compiler Name="ComparisonFalse">True</Compiler>
+ <Compiler Name="ComparisonTrue">True</Compiler>
+ <Compiler Name="ComparingSignedUnsigned">True</Compiler>
+ <Compiler Name="CombiningSignedUnsigned">True</Compiler>
+ <Compiler Name="UnsupportedConstruct">True</Compiler>
+ <Compiler Name="FileOpen">True</Compiler>
+ <Compiler Name="FileOpenUnitSrc">True</Compiler>
+ <Compiler Name="BadGlobalSymbol">True</Compiler>
+ <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
+ <Compiler Name="InvalidDirective">True</Compiler>
+ <Compiler Name="PackageNoLink">True</Compiler>
+ <Compiler Name="PackageThreadVar">True</Compiler>
+ <Compiler Name="ImplicitImport">True</Compiler>
+ <Compiler Name="HPPEMITIgnored">True</Compiler>
+ <Compiler Name="NoRetVal">True</Compiler>
+ <Compiler Name="UseBeforeDef">True</Compiler>
+ <Compiler Name="ForLoopVarUndef">True</Compiler>
+ <Compiler Name="UnitNameMismatch">True</Compiler>
+ <Compiler Name="NoCFGFileFound">True</Compiler>
+ <Compiler Name="MessageDirective">True</Compiler>
+ <Compiler Name="ImplicitVariants">True</Compiler>
+ <Compiler Name="UnicodeToLocale">True</Compiler>
+ <Compiler Name="LocaleToUnicode">True</Compiler>
+ <Compiler Name="ImagebaseMultiple">True</Compiler>
+ <Compiler Name="SuspiciousTypecast">True</Compiler>
+ <Compiler Name="PrivatePropAccessor">True</Compiler>
+ <Compiler Name="UnsafeType">False</Compiler>
+ <Compiler Name="UnsafeCode">False</Compiler>
+ <Compiler Name="UnsafeCast">False</Compiler>
+ <Compiler Name="OptionTruncated">True</Compiler>
+ <Compiler Name="WideCharReduced">True</Compiler>
+ <Compiler Name="DuplicatesIgnored">True</Compiler>
+ </Compiler>
+ <Linker>
+ <Linker Name="MapFile">0</Linker>
+ <Linker Name="OutputObjs">0</Linker>
+ <Linker Name="ConsoleApp">1</Linker>
+ <Linker Name="DebugInfo">False</Linker>
+ <Linker Name="RemoteSymbols">False</Linker>
+ <Linker Name="GenerateDRC">False</Linker>
+ <Linker Name="MinStackSize">16384</Linker>
+ <Linker Name="MaxStackSize">1048576</Linker>
+ <Linker Name="ImageBase">4194304</Linker>
+ <Linker Name="ExeDescription"></Linker>
+ </Linker>
+ <Directories>
+ <Directories Name="OutputDir"></Directories>
+ <Directories Name="UnitOutputDir"></Directories>
+ <Directories Name="PackageDLLOutputDir"></Directories>
+ <Directories Name="PackageDCPOutputDir"></Directories>
+ <Directories Name="SearchPath"></Directories>
+ <Directories Name="Packages">vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP</Directories>
+ <Directories Name="Conditionals"></Directories>
+ <Directories Name="DebugSourceDirs"></Directories>
+ <Directories Name="UsePackages">False</Directories>
+ </Directories>
+ <Parameters>
+ <Parameters Name="RunParams"></Parameters>
+ <Parameters Name="HostApplication"></Parameters>
+ <Parameters Name="Launcher"></Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="DebugCWD"></Parameters>
+ <Parameters Name="RemoteHost"></Parameters>
+ <Parameters Name="RemotePath"></Parameters>
+ <Parameters Name="RemoteLauncher"></Parameters>
+ <Parameters Name="RemoteCWD"></Parameters>
+ <Parameters Name="RemoteDebug">False</Parameters>
+ </Parameters>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">True</VersionInfo>
+ <VersionInfo Name="MajorVer">5</VersionInfo>
+ <VersionInfo Name="MinorVer">9</VersionInfo>
+ <VersionInfo Name="Release">5</VersionInfo>
+ <VersionInfo Name="Build">1</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">2052</VersionInfo>
+ <VersionInfo Name="CodePage">936</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
+ <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">5.9.5.1</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
+ <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
+ <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
+ <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+ </VersionInfoKeys> <Excluded_Packages>
+ <Excluded_Packages Name="c:\delphi9\Bin\dcldbx90.bpl">(Untitled)</Excluded_Packages>
+ <Excluded_Packages Name="c:\delphi9\Bin\dclib90.bpl">Borland VCL IBX Components for Win32</Excluded_Packages>
+ <Excluded_Packages Name="c:\delphi9\Bin\dclIndyCore90.bpl">Indy 10 Core Design Time</Excluded_Packages>
+ <Excluded_Packages Name="c:\delphi9\Bin\dclIndyProtocols90.bpl">Indy 10 Protocols Design Time</Excluded_Packages>
+ <Excluded_Packages Name="c:\delphi9\Bin\dcldbxcds90.bpl">Borland SimpleDataset Component (DBX)</Excluded_Packages>
+ </Excluded_Packages>
+ </Delphi.Personality>
+</BorlandProject>
View
90 Project1.bdsproj.local
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+ <Transactions>
+ <Transaction>2005-07-23 12:58:13.335.pas,C:\Documents and Settings\Administrator\桌面\5.95\UFrameAboutSimpleEqu.pas=</Transaction>
+ <Transaction>2005-07-23 12:58:13.345.dfm,C:\Documents and Settings\Administrator\桌面\5.95\UFrameAboutSimpleEqu.dfm=</Transaction>
+ <Transaction>2005-07-23 13:02:12.739.pas,C:\Documents and Settings\Administrator\桌面\5.95\UFrameFocusOfSE.pas=</Transaction>
+ <Transaction>2005-07-23 13:02:12.739.dfm,C:\Documents and Settings\Administrator\桌面\5.95\UFrameFocusOfSE.dfm=</Transaction>
+ <Transaction>2005-07-23 13:13:40.658.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UMyFrame.pas</Transaction>
+ <Transaction>2005-07-23 13:13:40.658.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UMyFrame.dfm</Transaction>
+ <Transaction>2005-07-23 13:44:14.625.pas,C:\Documents and Settings\Administrator\桌面\5.951\UFramePointCreateEqu.pas=</Transaction>
+ <Transaction>2005-07-23 13:44:14.645.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UFramePointCreateEqu.dfm=</Transaction>
+ <Transaction>2005-07-23 13:59:34.748.pas,C:\Documents and Settings\Administrator\桌面\5.951\UFrameBeeline.pas=</Transaction>
+ <Transaction>2005-07-23 13:59:34.758.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UFrameBeeline.dfm=</Transaction>
+ <Transaction>2005-07-23 14:00:21.646.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameBeeline.pas</Transaction>
+ <Transaction>2005-07-23 14:00:21.646.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameBeeline.dfm</Transaction>
+ <Transaction>2005-07-23 14:38:50.021.pas,C:\Documents and Settings\Administrator\桌面\5.951\UFrameAboutTriangle.pas=</Transaction>
+ <Transaction>2005-07-23 14:38:50.031.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UFrameAboutTriangle.dfm=</Transaction>
+ <Transaction>2005-07-23 15:09:06.675.pas,C:\Documents and Settings\Administrator\桌面\5.951\UFrameCalculate.pas=</Transaction>
+ <Transaction>2005-07-23 15:09:06.695.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UFrameCalculate.dfm=</Transaction>
+ <Transaction>2005-07-23 15:15:26.020.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\USymmetrizePoint.pas</Transaction>
+ <Transaction>2005-07-23 15:15:26.030.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\USymmetrizePoint.dfm</Transaction>
+ <Transaction>2005-07-23 18:15:41.850.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameRoundness.pas</Transaction>
+ <Transaction>2005-07-23 18:15:41.860.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameRoundness.dfm</Transaction>
+ <Transaction>2005-07-25 20:25:00.688.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UAboutPolygon.pas</Transaction>
+ <Transaction>2005-07-25 20:25:00.698.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UAboutPolygon.dfm</Transaction>
+ <Transaction>2005-07-25 21:02:49.891.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UParabola.pas</Transaction>
+ <Transaction>2005-07-25 21:02:49.891.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UParabola.dfm</Transaction>
+ <Transaction>2005-07-25 21:14:58.028.pas,C:\Documents and Settings\Administrator\桌面\5.951\UFramePointCreateEqu.pas=</Transaction>
+ <Transaction>2005-07-25 21:14:58.028.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UFramePointCreateEqu.dfm=</Transaction>
+ <Transaction>2005-07-26 11:20:44.052.pas,C:\Documents and Settings\Administrator\桌面\5.951\UParabola.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameParabola.pas</Transaction>
+ <Transaction>2005-07-26 11:20:44.052.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UParabola.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameParabola.dfm</Transaction>
+ <Transaction>2005-07-26 20:41:35.505.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\USolveQuadricEquationInOneVariable.pas</Transaction>
+ <Transaction>2005-07-26 20:41:35.525.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\USolveQuadricEquationInOneVariable.dfm</Transaction>
+ <Transaction>2005-07-26 20:42:20.660.pas,C:\Documents and Settings\Administrator\桌面\5.951\USolveQuadricEquationInOneVariable.pas=C:\Documents and Settings\Administrator\桌面\5.951\USolveEquation.pas</Transaction>
+ <Transaction>2005-07-26 20:42:20.660.dfm,C:\Documents and Settings\Administrator\桌面\5.951\USolveQuadricEquationInOneVariable.dfm=C:\Documents and Settings\Administrator\桌面\5.951\USolveEquation.dfm</Transaction>
+ <Transaction>2005-07-26 20:43:14.838.pas,C:\Documents and Settings\Administrator\桌面\5.951\USolveEquation.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSolveEquation.pas</Transaction>
+ <Transaction>2005-07-26 20:43:14.838.dfm,C:\Documents and Settings\Administrator\桌面\5.951\USolveEquation.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSolveEquation.dfm</Transaction>
+ <Transaction>2005-07-28 13:33:42.691.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSymmetrizeEquation.pas</Transaction>
+ <Transaction>2005-07-28 13:33:42.701.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSymmetrizeEquation.dfm</Transaction>
+ <Transaction>2005-07-28 13:34:06.846.pas,C:\Documents and Settings\Administrator\桌面\5.951\USymmetrizePoint.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSymmetrizePoint.pas</Transaction>
+ <Transaction>2005-07-28 13:34:06.846.dfm,C:\Documents and Settings\Administrator\桌面\5.951\USymmetrizePoint.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameSymmetrizePoint.dfm</Transaction>
+ <Transaction>2005-07-28 13:37:16.829.pas,C:\Documents and Settings\Administrator\桌面\5.951\UAboutPolygon.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameAboutPolygon.pas</Transaction>
+ <Transaction>2005-07-28 13:37:16.829.dfm,C:\Documents and Settings\Administrator\桌面\5.951\UAboutPolygon.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameAboutPolygon.dfm</Transaction>
+ <Transaction>2005-08-05 17:35:44.787.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameLinearEquations.pas</Transaction>
+ <Transaction>2005-08-05 17:35:44.787.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameLinearEquations.dfm</Transaction>
+ <Transaction>2005-08-06 11:30:46.270.pas,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.951\UFrameFinishEquation.pas</Transaction>
+ <Transaction>2005-08-06 11:30:46.270.dfm,C:\Documents and Settings\Administrator\桌面\5.951\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.951\UFrameFinishEquation.dfm</Transaction>
+ <Transaction>2005-09-03 19:37:37.078.pas,D:\(信息) 孙嘉龙的程序 勿动!\程序 勿动!\5.951\Unit2.pas=</Transaction>
+ <Transaction>2005-09-03 19:41:10.375.pas,D:\(信息) 孙嘉龙的程序 勿动!\程序 勿动!\5.951\Unit1.pas=D:\(信息) 孙嘉龙的程序 勿动!\程序 勿动!\5.951\UFrameCurveOfSecondOrder.pas</Transaction>
+ <Transaction>2005-09-03 19:41:10.375.dfm,D:\(信息) 孙嘉龙的程序 勿动!\程序 勿动!\5.951\Unit1.dfm=D:\(信息) 孙嘉龙的程序 勿动!\程序 勿动!\5.951\UFrameCurveOfSecondOrder.dfm</Transaction>
+ <Transaction>2005-09-30 20:10:11.370.pas,C:\Documents and Settings\Administrator\桌面\5.952\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.952\UBaseFrame.pas</Transaction>
+ <Transaction>2005-09-30 20:10:11.370.dfm,C:\Documents and Settings\Administrator\桌面\5.952\Unit1.dfm=C:\Documents and Settings\Administrator\桌面\5.952\UBaseFrame.dfm</Transaction>
+ <Transaction>2005-09-30 20:28:59.903.pas,C:\Documents and Settings\Administrator\桌面\5.952\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.952\UCalcClasses.pas</Transaction>
+ <Transaction>2005-10-01 08:36:09.857.pas,C:\Documents and Settings\Administrator\桌面\5.952\Unit1.pas=C:\Documents and Settings\Administrator\桌面\5.952\UAngle.pas</Transaction>
+ <Transaction>2005-10-02 12:30:53.329.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSymmetrizePoint.pas=</Transaction>
+ <Transaction>2005-10-02 12:30:53.339.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSymmetrizePoint.dfm=</Transaction>
+ <Transaction>2005-10-02 12:31:01.231.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSymmetrizeEquation.pas=</Transaction>
+ <Transaction>2005-10-02 12:31:01.231.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSymmetrizeEquation.dfm=</Transaction>
+ <Transaction>2005-10-02 12:31:12.507.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCirSymPoint.pas=</Transaction>
+ <Transaction>2005-10-02 12:31:12.507.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCirSymPoint.dfm=</Transaction>
+ <Transaction>2005-10-02 12:31:17.134.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameAboutPolygon.pas=</Transaction>
+ <Transaction>2005-10-02 12:31:17.134.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameAboutPolygon.dfm=</Transaction>
+ <Transaction>2005-10-02 17:41:55.254.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameAboutTriangle.pas=</Transaction>
+ <Transaction>2005-10-02 17:41:55.264.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameAboutTriangle.dfm=</Transaction>
+ <Transaction>2005-10-02 17:58:07.983.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCalculate.pas=</Transaction>
+ <Transaction>2005-10-02 17:58:07.983.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCalculate.dfm=</Transaction>
+ <Transaction>2005-10-02 18:32:55.214.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCurveOfSecondOrder.pas=</Transaction>
+ <Transaction>2005-10-02 18:32:55.224.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameCurveOfSecondOrder.dfm=</Transaction>
+ <Transaction>2005-10-02 19:21:04.499.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameBeeline.pas=</Transaction>
+ <Transaction>2005-10-02 19:21:04.529.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameBeeline.dfm=</Transaction>
+ <Transaction>2005-10-02 20:21:01.671.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameRoundness.pas=</Transaction>
+ <Transaction>2005-10-02 20:21:01.681.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameRoundness.dfm=</Transaction>
+ <Transaction>2005-10-03 12:14:48.422.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameParabola.pas=</Transaction>
+ <Transaction>2005-10-03 12:14:48.422.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameParabola.dfm=</Transaction>
+ <Transaction>2005-10-03 12:30:19.992.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSolveEquation.pas=</Transaction>
+ <Transaction>2005-10-03 12:30:20.002.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameSolveEquation.dfm=</Transaction>
+ <Transaction>2005-10-03 12:51:23.709.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameFinishEquation.pas=</Transaction>
+ <Transaction>2005-10-03 12:51:23.709.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameFinishEquation.dfm=</Transaction>
+ <Transaction>2006-02-05 20:28:44.907.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameLinearEquations.pas=</Transaction>
+ <Transaction>2006-02-05 20:28:44.907.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameLinearEquations.dfm=</Transaction>
+ <Transaction>2006-02-05 20:29:05.998.pas,C:\Documents and Settings\Administrator\桌面\5.952\UFrameDeterminant.pas=</Transaction>
+ <Transaction>2006-02-05 20:29:05.998.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UFrameDeterminant.dfm=</Transaction>
+ <Transaction>2006-02-05 20:31:58.005.pas,C:\Documents and Settings\Administrator\桌面\5.952\Unit2.pas=C:\Documents and Settings\Administrator\桌面\5.952\UHAbout.pas</Transaction>
+ <Transaction>2006-02-05 20:31:58.005.dfm,C:\Documents and Settings\Administrator\桌面\5.952\Unit2.dfm=C:\Documents and Settings\Administrator\桌面\5.952\UHAbout.dfm</Transaction>
+ <Transaction>2006-02-05 20:43:29.680.pas,C:\Documents and Settings\Administrator\桌面\5.952\UAbout.pas=</Transaction>
+ <Transaction>2006-02-05 20:43:29.690.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UAbout.dfm=</Transaction>
+ <Transaction>2006-02-07 21:18:36.144.pas,C:\Documents and Settings\Administrator\桌面\5.952\UMyFrame.pas=</Transaction>
+ <Transaction>2006-02-07 21:18:36.154.dfm,C:\Documents and Settings\Administrator\桌面\5.952\UMyFrame.dfm=</Transaction>
+ </Transactions>
+</BorlandProject>
View
38 Project1.cfg
@@ -0,0 +1,38 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"E:\ÎŇľÄÎÄľľ\Borland Studio Projects\Bpl"
+-LN"E:\ÎŇľÄÎÄľľ\Borland Studio Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
View
138 Project1.dof
@@ -0,0 +1,138 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=1
+MajorVer=5
+MinorVer=8
+Release=5
+Build=1
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=2052
+CodePage=936
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=5.8.5.1
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
View
32 Project1.dpr
@@ -0,0 +1,32 @@
+program Project1;
+
+uses
+ Forms,
+ Kernel in 'Kernel.pas',
+ MathFunction in 'MathFunction.pas',
+ UCoordinates in 'UCoordinates.pas',
+ UEquation in 'UEquation.pas',
+ UFraction in 'UFraction.pas',
+ UFrameInput in 'UFrameInput.pas' {FrameInput: TFrame},
+ UGetInfo in 'UGetInfo.pas',
+ UMain in 'UMain.pas' {Form1},
+ URadical in 'URadical.pas',
+ UTempF in 'UTempF.pas' {TempF},
+ UtoMathematica in 'UtoMathematica.pas' {ToMathematica},
+ UBaseFrame in 'UBaseFrame.pas' {BaseFrame: TFrame},
+ UCalcClasses in 'UCalcClasses.pas',
+ UAngle in 'UAngle.pas',
+ UHAbout in 'UHAbout.pas' {HAbout};
+
+{$R *.res}
+{$R StringLines.res}
+
+begin
+ Application.Initialize;
+ Application.Title := '平面解析几何计算器';
+ Application.CreateForm(TForm1, Form1);
+ Application.CreateForm(TToMathematica, ToMathematica);
+ Application.CreateForm(TTempF, TempF);
+ Application.CreateForm(THAbout, HAbout);
+ Application.Run;
+end.
View
490 Project1.dsk
@@ -0,0 +1,490 @@
+[Closed Files]
+File_0=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UBaseFrame.pas',0,1,1,1,1,0,0,,
+File_1=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UMain.pas',0,1,1,58,6,0,0,,
+File_2=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UMyFrame.pas',0,1,1,1,1,0,0,,
+File_3=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UCalcClasses.pas',0,1,319,251,334,0,0,,
+File_4=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UCoordinates.pas',0,1,1,20,35,0,0,,
+File_5=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\URadical.pas',0,1,672,10,681,0,0,,
+File_6=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UEquation.pas',0,1,340,22,350,0,0,,
+File_7=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UGetInfo.pas',0,1,78,1,82,0,0,,
+File_8=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UHAbout.pas',0,1,1,9,17,0,0,,
+File_9=TSourceModule,'C:\Documents and Settings\Administrator\����\5.952\UTempF.pas',0,1,1,1,1,0,0,,
+
+[Modules]
+Module0=C:\Documents and Settings\Administrator\����\5.952\Project1.bdsproj
+Count=1
+EditWindowCount=1
+
+[C:\Documents and Settings\Administrator\����\5.952\Project1.bdsproj]
+ModuleType=TBaseProject
+
+[EditWindow0]
+ViewCount=1
+CurrentEditView=C:\Documents and Settings\Administrator\����\5.952\Project1.dpr
+View0=0
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=9888
+Height=8498
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=9888
+ClientHeight=8498
+DockedToMainForm=1
+MessageView=MessageView@EditWindow0
+BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
+TopPanelSize=0
+LeftPanelSize=0
+RightPanelSize=0
+BottomPanelSize=0
+BottomPanelClients=MessageView@EditWindow0,ToDo List,DockSite1
+BottomPanelData=000008000102030000000B0000004D657373616765566965770E000000546F446F4C69737457696E646F7709000000446F636B53697465317F33000000000000020F03000000000000FFFFFFFF
+BottomMiddlePanelSize=0
+BottomMiddlePanelClients=DockSite0
+BottomMiddelPanelData=0000080001000100000009000000446F636B53697465300000000000000000000000000000000000FFFFFFFF
+TabDockLeftClients=StructureView=0,DockSite3=1
+TabDockRightClients=DockSite2=0,ToolForm=1
+
+[View0]
+CustomEditViewType=TEditView
+Module=C:\Documents and Settings\Administrator\����\5.952\Project1.dpr
+CursorX=1
+CursorY=1
+TopLine=1
+LeftCol=1
+Elisions=
+Bookmarks=
+
+[Watches]
+Count=0
+
+[WatchWindow]
+WatchColumnWidth=120
+WatchShowColumnHeaders=1
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=212
+LRDockWidth=13600
+Dockable=1
+StayOnTop=0
+
+[Breakpoints]
+Count=0
+
+[AddressBreakpoints]
+Count=0
+
+[Main Window]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=0
+State=0
+Left=12
+Top=-18
+Width=9988
+Height=10018
+MaxLeft=-12
+MaxTop=-18
+ClientWidth=9888
+ClientHeight=9417
+BottomPanelSize=8017
+BottomPanelClients=EditWindow0
+BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF
+
+[ProjectManager]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2150
+Height=5283
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2150
+ClientHeight=5283
+TBDockHeight=5919
+LRDockWidth=3150
+Dockable=1
+StayOnTop=0
+
+[ToolForm]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2250
+Height=6519
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2250
+ClientHeight=6519
+TBDockHeight=6519
+LRDockWidth=2250
+Dockable=1
+StayOnTop=0
+
+[CallStackWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=2067
+LRDockWidth=3488
+Dockable=1
+StayOnTop=0
+
+[ToDo List]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=-5
+Top=-562
+Width=3675
+Height=1166
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3675
+ClientHeight=1166
+TBDockHeight=1166
+LRDockWidth=3675
+Dockable=1
+StayOnTop=0
+Column0Width=200
+Column1Width=30
+Column2Width=100
+Column3Width=70
+Column4Width=70
+SortOrder=4
+ShowHints=1
+ShowChecked=1
+
+[FindReferencsForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2238
+Height=1696
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2238
+ClientHeight=1696
+TBDockHeight=2314
+LRDockWidth=2825
+Dockable=1
+StayOnTop=0
+
+[RefactoringForm]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2238
+Height=1696
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2238
+ClientHeight=1696
+TBDockHeight=3216
+LRDockWidth=2825
+Dockable=1
+StayOnTop=0
+
+[DebugLogView]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=406
+LRDockWidth=4950
+Dockable=1
+StayOnTop=0
+
+[ThreadStatusWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=212
+LRDockWidth=7412
+Dockable=1
+StayOnTop=0
+Column0Width=145
+Column1Width=100
+Column2Width=115
+Column3Width=250
+
+[LocalVarsWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=265
+LRDockWidth=3488
+Dockable=1
+StayOnTop=0
+
+[PropertyInspector]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=1800
+Height=4064
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1800
+ClientHeight=4064
+TBDockHeight=406
+LRDockWidth=1900
+Dockable=1
+StayOnTop=0
+SplitPos=79
+
+[BreakpointWindow]
+PercentageSizes=1
+Create=1
+Visible=1
+Docked=1
+State=0
+Left=0
+Top=0
+Width=3725
+Height=4435
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3725
+ClientHeight=4435
+TBDockHeight=1537
+LRDockWidth=8738
+Dockable=1
+StayOnTop=0
+Column0Width=100
+Column1Width=75
+Column2Width=200
+Column3Width=200
+Column4Width=75
+Column5Width=75
+
+[StructureView]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=0
+Top=0
+Width=1900
+Height=3675
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1900
+ClientHeight=3675
+TBDockHeight=3675
+LRDockWidth=1900
+Dockable=1
+StayOnTop=0
+
+[MessageView@EditWindow0]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=-5
+Top=-562
+Width=4325
+Height=424
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=4112
+ClientHeight=424
+TBDockHeight=424
+LRDockWidth=4325
+Dockable=1
+StayOnTop=0
+
+[BorlandEditorCodeExplorer@EditWindow0]
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=0
+State=0
+Left=0
+Top=0
+Width=2338
+Height=8004
+MaxLeft=-12
+MaxTop=-18
+ClientWidth=2238
+ClientHeight=7544
+TBDockHeight=8004
+LRDockWidth=2338
+Dockable=1
+StayOnTop=0
+
+[DockHosts]
+DockHostCount=4
+
+[DockSite0]
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=-5
+Top=-562
+Width=2338
+Height=2314
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2338
+ClientHeight=2314
+TBDockHeight=2314
+LRDockWidth=2338
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=FindReferencsForm
+TabDockClients=RefactoringForm,FindReferencsForm
+
+[DockSite1]
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=-5
+Top=-562
+Width=3825
+Height=5053
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=3825
+ClientHeight=5053
+TBDockHeight=5053
+LRDockWidth=3825
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=LocalVarsWindow
+TabDockClients=BreakpointWindow,CallStackWindow,WatchWindow,ThreadStatusWindow,DebugLogView,LocalVarsWindow
+
+[DockSite2]
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=0
+Top=0
+Width=2250
+Height=5459
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=2250
+ClientHeight=5459
+TBDockHeight=5459
+LRDockWidth=2250
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=ProjectManager
+TabDockClients=ProjectManager
+
+[DockSite3]
+DockSiteType=1
+PercentageSizes=1
+Create=1
+Visible=0
+Docked=1
+State=0
+Left=0
+Top=0
+Width=1900
+Height=4240
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1900
+ClientHeight=4240
+TBDockHeight=4240
+LRDockWidth=1900
+Dockable=1
+StayOnTop=0
+TabPosition=1
+ActiveTabID=PropertyInspector
+TabDockClients=PropertyInspector
+
View
BIN  Project1.exe
Binary file not shown
View
BIN  Project1.res
Binary file not shown
View
10 README.md
@@ -1,4 +1,12 @@
GeometryCalc
============
-古董项目,基于符号计算内核的高中解析几何计算程序
+初中时期做得古董项目,使用Delphi编写,基于符号计算内核的高中解析几何计算程序,
+维护工作一直到高中。
+
+特点:
+ * 准符号计算内核,对分数、含有“单层”根号的无理数的准确表示,支持相关计算、化简。
+ * 支持初中常见的各种解析几何问题。(二维解析几何,其实高中的也就是推广到三维而已……)
+ * (当时认为的)人性化UI界面,其实做得还是很复杂的,请在输入框里按右键。
+
+我会说我就是在这个项目里学的指针么……(一个小屁孩成天调指针BUG伤不起……)
View
BIN  StringLines.RES
Binary file not shown
View
BIN  UAngle.dcu
Binary file not shown
View
95 UAngle.pas
@@ -0,0 +1,95 @@
+unit UAngle;
+
+interface
+
+uses
+ URadical;
+
+type
+ Angle=record
+ Value:Radical;
+ //value 为角的正切值
+ Quadrant:Boolean;
+ //quadrant 象限 True 为 一四象限 False 为二三象限
+ Sin:Radical;
+ Cos:Radical;
+ end;
+ AngleValueType=(avtT,avtS);
+
+function StrToAgl(const s:String):Angle;
+procedure FinishAgl(var Agl:Angle;const avtype:AngleValueType);
+function AglToStr(const Agl:Angle):String;
+function AglToStrE(const a:Angle;const kz:Boolean=False):String;
+
+implementation
+
+uses
+ UGetInfo;
+const
+ StrToAglError:String='象限标记输入错误';
+
+function StrToAgl(const s:String):Angle;
+var
+ bb:integer;
+begin
+ bb:=Pos(':',s);
+ Result.Value :=StrCalc(Copy(s,1,bb-1));
+ if (Copy(s,bb+1,Length(s)-bb)='1') or (Copy(s,bb+1,Length(s)-bb)='4') then
+ Result.Quadrant :=True
+ else if (Copy(s,bb+1,Length(s)-bb)='2') or (Copy(s,bb+1,Length(s)-bb)='3') then
+ Result.Quadrant :=False
+ else
+ raise EInfoFormat.Create(StrToAglError+#13#10+Copy(s,bb+1,Length(s)-bb));
+end;
+
+procedure FinishAgl(var Agl:Angle;const avtype:AngleValueType);
+const
+ op1:array[0..3] of Optype=(divi,powe,addi,powe);
+ br1:array[0..1] of integer=(2,-3);
+ op2:array[0..2] of Optype=(subt,powe,powe);
+ br2:array[0..1] of integer=(1,-2);
+var
+ Exp:Expression;
+begin
+ case avtype of
+ avtT:begin
+
+ //Agl.Cos=1/(Agl.Value^2+1)^(1/2)
+ PutOb(Exp,op1,br1);
+ PutR(Exp,[@csg1,@Agl.Value,@csg2,@csg1,@csgf2]);
+ Agl.Cos := ExpCalc(Exp);
+ if not Agl.Quadrant then
+ ZeroMinus(Agl.Cos );
+
+ Agl.Sin :=CR(Agl.Value ,Agl.Cos ,3);
+ end;
+ avtS:Begin
+ //Agl.Cos=(1-Agl.Sin^2)^csgf2
+ PutOb(Exp,op2,br2);
+ PutR(Exp,[@csg1,@Agl.Sin,@csg2,@csgf2]);
+ Agl.Cos :=ExpCalc(Exp);
+ if not Agl.Quadrant then
+ ZeroMinus(Agl.Cos );
+
+ Agl.Value :=CR(Agl.Sin ,Agl.Cos ,4);
+ end;
+ end;
+end;
+
+function AglToStr(const Agl:Angle):String;
+begin
+ Result:=AglToStr(Agl)+';';
+ if Agl.Quadrant then
+ Result:=Result+'1'
+ else
+ Result:=Result+'2';
+end;
+
+function AglToStrE(const a:Angle;const kz:Boolean=False):String;
+begin
+ Result:=RadToStrE(a.Value);
+ if kz and (Result<>'') then
+ Result:=Result+#13#10;
+end;
+
+end.
View
BIN  UBaseFrame.dcu
Binary file not shown
View
80 UBaseFrame.dfm
@@ -0,0 +1,80 @@
+object BaseFrame: TBaseFrame
+ Left = 0
+ Top = 0
+ Width = 369
+ Height = 385
+ AutoSize = True
+ TabOrder = 0
+ TabStop = True
+ object GroupBox1: TGroupBox
+ Left = 0
+ Top = 0
+ Width = 369
+ Height = 385
+ Caption = 'GroupBox1'
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 24
+ Top = 24
+ Width = 60
+ Height = 13
+ Caption = #35745#31639#35828#26126#65306
+ end
+ object Button1: TButton
+ Left = 69
+ Top = 256
+ Width = 89
+ Height = 25
+ Caption = #35745#31639
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 213
+ Top = 256
+ Width = 89
+ Height = 25
+ Caption = #28165#38500
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+ object Memo1: TMemo
+ Left = 16
+ Top = 40
+ Width = 337
+ Height = 73
+ ScrollBars = ssVertical
+ TabOrder = 2
+ end
+ inline FrameInput1: TFrameInput
+ Left = 8
+ Top = 128
+ Width = 353
+ Height = 121
+ TabOrder = 3
+ TabStop = True
+ inherited Label1: TLabel
+ Width = 353
+ end
+ inherited Memo1: TMemo
+ Width = 353
+ Height = 108
+ end
+ end
+ inline FrameInput2: TFrameInput
+ Left = 8
+ Top = 288
+ Width = 353
+ Height = 89
+ TabOrder = 4
+ TabStop = True
+ inherited Label1: TLabel
+ Width = 353
+ end
+ inherited Memo1: TMemo
+ Width = 353
+ Height = 76
+ end
+ end
+ end
+end
View
106 UBaseFrame.pas
@@ -0,0 +1,106 @@
+unit UBaseFrame;
+
+interface
+
+uses
+ SysUtils, Classes, Controls, Forms, StdCtrls, UFrameInput, UGetInfo;
+
+type
+ StringInfoType=(siTitle,siIntro,siParent);
+ TCalcClass=class;
+
+ TBaseFrame = class(TFrame)
+ GroupBox1: TGroupBox;
+ Label1: TLabel;
+ Button1: TButton;
+ Button2: TButton;
+ Memo1: TMemo;
+ FrameInput1: TFrameInput;
+ FrameInput2: TFrameInput;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ private
+ FCalcClass:TCalcClass;
+ public
+ constructor Create(AOwner: TComponent); override;
+ procedure PCalcClass(CalcClass:TCalcClass);
+ destructor Destroy; override;
+ end;
+
+ IInfoTType=(ittIn,ittOut);
+
+ TCalcClass=class
+ FBaseFrame:TBaseFrame;
+ protected
+ function IInfos:Infos;
+ procedure OInfos(const Inf:Infos);
+ public
+ constructor Create(BaseFrame:TBaseFrame);virtual;
+ class function StringInfo(const SiType:StringInfoType):String;virtual;abstract;
+ procedure Calc;virtual;abstract;
+ function InfoType(const itt:IInfoTType):IInfoType;virtual;abstract;
+ procedure CheckInfos;
+ property Infor: Infos read IInfos write OInfos;
+ end;
+
+implementation
+
+{$R *.dfm}
+
+constructor TCalcClass.Create;
+begin
+ inherited Create;
+ FBaseFrame:=BaseFrame;
+ FBaseFrame.FrameInput1.CHBr(InfoType(ittIn));
+ FBaseFrame.FrameInput2.CHBr(InfoType(ittOut));
+ FBaseFrame.FrameInput1.Template ;
+ FBaseFrame.GroupBox1.Caption :=StringInfo(siTitle);
+ FBaseFrame.Memo1.Text:=StringInfo(siIntro);
+end;
+
+procedure TCalcClass.CheckInfos ;
+begin
+ FBaseFrame.Frameinput1.CheckInfos ;
+end;
+
+function TCalcClass.IInfos;
+begin
+ Result:=FBaseFrame.FrameInput1.Infor;
+end;
+
+procedure TCalcClass.OInfos;
+begin
+ FBaseFrame.FrameInput2.Infor :=Inf;
+ FBaseFrame.FrameInput2.SApproximation ;
+end;
+
+constructor TBaseFrame.Create;
+begin
+ inherited;
+ FrameInput2.ExResult :=True;
+end;
+
+procedure TBaseFrame.PCalcClass;
+begin
+ FCalcClass.Free ;
+ FCalcClass:=CalcClass;
+end;
+
+procedure TBaseFrame.Button2Click(Sender: TObject);
+begin
+ FrameInput1.Template ;
+ FrameInput2.Clean ;
+end;
+
+procedure TBaseFrame.Button1Click(Sender: TObject);
+begin
+ FCalcClass.Calc ;
+end;
+
+destructor TBaseFrame.Destroy;
+begin
+ FCalcClass.Free;
+ inherited;
+end;
+
+end.
View
BIN  UCalcClasses.dcu
Binary file not shown
View
1,647 UCalcClasses.pas
@@ -0,0 +1,1647 @@
+unit UCalcClasses;
+
+interface
+
+uses
+ UBaseFrame,
+ SysUtils,ComCtrls,//MTree,FindInTree Use
+ MathFunction, UFrameInput, UGetInfo, UAngle,URadical,UEquation,UCoordinates;
+
+type
+ TCCClass=class of TCalcClass;
+ TCalcSymmetrizePoint=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcSymmetrizeEquationAboutPoint=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcSymmetrizeEquationAboutBeeline=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCirSymPoint=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutPolygon=class(TCalcClass)
+ public
+ constructor Create(BaseFrame:TBaseFrame);override;
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ EAboutTriangle=class(Exception);
+
+ TCalcAboutTriangleSides=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleSidesLength=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleBarycenter=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleIncenter=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleCircumcenter=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleOrthocenter=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleSize=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleInscribedCircleRadius=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleCircumradius=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleInscribedCircleEquation=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcAboutTriangleCircumCircleEquation=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcExpression=class(TCalcClass)
+ public
+ constructor Create(BaseFrame:TBaseFrame);override;
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCurveOfSecondOrderTangent=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCurveOfSecondOrderNormal=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcBeelineCurveOfSecondOrderChordLength=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCreateSimpleEquation=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcPerpendicularBisectorOfSimpleEquation=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcDistanceOfCoordinates=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcDistanceBetweenCoordinateBeeline=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcPointODivision=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcFocusOfBeeline=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCreateRoundnessEquationC=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCreateRoundnessEquationC2=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCreateRoundnessEquationCR=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcRoundnessEquationCentreR=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcRoundnessTangentK=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;
+ function InfoType(const itt:IInfoTType):IInfoType;override;
+ end;
+
+ TCalcCreateParabolaEquation=class(TCalcClass)
+ public
+ class function StringInfo(const SiType:StringInfoType):String;override;
+ procedure Calc;override;