3、ole.ReadLineO);}else{Console.Write(,z请输入第{0}个点的第⑴个像点坐标:",i+1,j-2);zuobiao[i,j]=double・Parse(Console.ReadLineO);}}Console.WriteLineO;)//归算像点坐标for(i=0;i<4;i++){for(j=3;j<5;j卄){if(j==3)zuobiaofi,j]=zuobiao[i,j]-xO;elsezuobiao[i,j]=zuobiao[i,j]-yO;}}//计算和确定初值doublezsO=m*f,xsO=0tysO=0;for(i=0;i<4;i++)
4、xsO=xsO+zuobiao[i,0];ysO=ysO+zuobiaoEi,1];)xsO=xsO/4;ysO=ysO/4;〃逐点计算误差方程系数doublet,]xishu=newdouble[8,6];for(i二0;i<8;i+二2){doublex,y;x二zuobicio[i/2,3];y=zuobiao[i/2,4]:xishu[i,0]=xishufi+1,1]=-1/m;xishufi,1]=xishu[i2]=-x/(in*f);xishu[i,3]=-f*(1+x*x/(f*f));xishufi,4]=xishu[i+1,3]=-x*y/f;xishu[i,5]=
5、y;/(m*f);xishu[i+1,4]=-f*(1+y*y/(f*f));xishu[i+1,5]=-)〃计算逆阵doublet,JdMatrix=mcitrixChe(mtitrixTrcins(xishu),xishu);doublet,]dReturn=ReverseMatrix(dMatrix,6);Console.WriteLine(z,逆矩阵为:〃);if(dReturn!=null){matrixOut(dReturn);}〃求解过程doublephiO=0,omegaO=0tkappaO=0;intq=0;doublet,]r=newdouble[3,3];doubl
6、et,]jinsi二newdouble[4,2];doublet]chazhi=newdouble[8];double[]jieguo=newdouble[6];doublet,Jzhong=matrixChc(dReturn,matrixTreins(xishu));do{//计算旋转矩阵rr[0,0]=Math.Cos(phiO)*Math.Cos(kappaO)-Math.Sin(phiO)Math.Sin(kappciO);r[0,1]=-Math.Cos(phi0)*Math.Sin(kappaO)-Math.Sin(phiO)Math.Cos(kappaO);r[0,2]=-
7、Math.Sin(phiO)*Math.Cos(omegaO);r[1,0J=Math.Cos(omegaO)*Math.Sin(kappaO);r[1,1]=Math.Cos(omegaO)*Math.Cos(kappaO);r[1,2]=-Math.Sin(omegaO);r[2,0]=Math.Sin(phi0)*Math.Cos(kappaO)+Math.Cos(phiO)Math.Sin(kappaO):r[2,1]=-M