- 注册时间
- 2018-12-8
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 3549
- 在线时间
- 小时
|
发表于 2020-4-20 13:08:10
|
显示全部楼层
本帖最后由 dlpg070 于 2020-4-20 14:09 编辑
sheng_jianguo公式 解求度数第一题,
结果表明:
1 sheng_jianguo公式 完全正确
2 提高计算精度后, 结果正确,与6#答案相同
mathematica代码
- In[619]:= Clear["Global`*"];
- Print["sheng_jianguo公式 解求度数第一题"]
- (*
- 第一题解答:以A点为坐标原点建立直角坐标系,A到C为x轴正方向,y轴正方向朝上。不妨设C点x坐标为1(Cx=1)。B点x、y坐标为(由正弦定理):Bx=cos(A)*sin(C)/sin(B);By=sin(A)*sin(C)/sin(B);其中A=180\[Degree]-21\[Degree]-114\[Degree]=45\[Degree]
- P点x、y坐标为:Px=1/(1-k1*k2);Py=k2/(1-k1*k2);其中k1=tan(90+C/2);k2=tan(A/2)
- D点x、y坐标为:Dx=1/(1-k1*k3);Dy=k3/(1-k1*k3);其中k1=tan(90+C/2);k3=tan(A)
- T点x、y坐标为:Ty=0;Tx=Px-sqrt((Px-Bx)^2+(Py-By)^2-Py^2)
- E点x、y坐标为:Ex=1/(1-k2*k4);Ey=k2/(1-k2*k4);其中k2=tan(A/2);k4=tan(90+C)
- Y点x、y坐标由下面方程求出,取坐标值较小的一组数据:(Px-Yx)^2+(Py-Yy)^2-0.25*((Px-Ex)^2+(Py-Ey)^2)=0;(Dx-Yx)^2+(Dy-Yy)^2-0.25*((Px-Dx)^2+(Py-Dy)^2)=0
- K点x、y坐标由下面方程求出,取坐标值较小的一组数据:(Px-Kx)^2+(Py-Ky)^2-0.25*((Px-Ex)^2+(Py-Ey)^2)=0;(Bx-Kx)^2+(By-Ky)^2-0.25*((Px-Bx)^2+(Py-By)^2)=0
- \[Angle]TYK=\[Angle]1+\[Angle]YTA=154.235728416373603977262973785400\[Degree]
- 其中:\[Angle]1=atan((Ky-Yy)/(Kx-yX));\[Angle]YTA=atan(-(Ty-Yy)/(Tx-Yx))
- 不用奖励,只求答案方法结果正确。*)
- angB=114;
- angC=21;
- angA=180 -angB-angC;
- Ax=0;
- Ay=0;
- Cx=1;
- Cy=0;
- Bx=Cos[angA Degree]*Sin[angC Degree]/Sin[angB Degree];
- By=Sin[angA Degree]*Sin[angC Degree]/Sin[angB Degree];
- k1=Tan[(90+angC/2) Degree];k2=Tan[(angA/2) Degree];
- k3=Tan[(angA) Degree];
- k4=Tan[(90+angC) Degree];
- Px=1/(1-k1*k2);
- Py=k2/(1-k1*k2);
- Dx=1/(1-k1*k3);
- Dy=k3/(1-k1*k3);
- Ty=0;
- Tx=Px-Sqrt[((Px-Bx)^2+(Py-By)^2-Py^2)];
- Ex=1/(1-k2*k4);
- Ey=k2/(1-k2*k4);
- (*Y点x、y坐标由下面方程求出,取坐标值较小的一组数据:*)
- ansY=NSolve[{(Px-Yx)^2+(Py-Yy)^2-1/4*((Px-Ex)^2+(Py-Ey)^2)== 0 &&(Dx-Yx)^2+(Dy-Yy)^2-1/4*((Px-Dx)^2+(Py-Dy)^2)==0},{Yx,Yy},
- WorkingPrecision->150]//FullSimplify;
- N[ansY,40]
- Print["取第二解"]
- Yx=Yx/.ansY[[2,1]];
- Yy=Yy/.ansY[[2,2]];
- (*K点x、y坐标由下面方程求出,取坐标值较小的一组数据:*)
- ansK=NSolve[{(Px-Kx)^2+(Py-Ky)^2-1/4*((Px-Ex)^2+(Py-Ey)^2)==0 &&
- (Bx-Kx)^2+(By-Ky)^2-1/4*((Px-Bx)^2+(Py-By)^2)==0},{Kx,Ky},
- WorkingPrecision->150]//FullSimplify;
- N[ansK,40]
- Print["取第二解"]
- Kx=Kx/.ansK[[2,1]];
- Ky=Ky/.ansK[[2,2]];
- ang1=ArcTan[((Ky-Yy)/(Kx-Yx))]*180/Pi;
- YTA=ArcTan[(-(Ty-Yy)/(Tx-Yx))]*180/Pi;
- TYK=ang1+YTA;
- Print["验算用全部点的坐标:"]
- Print["A:",N[Ax,40]," , ",N[Ay,40]]
- Print["B:",N[Bx,40]," , ",N[By,40]]
- Print["C:",N[Cx,40]," , ",N[Cy,40]]
- Print["D:",N[Dx,40]," , ",N[Dy,40]]
- Print["E:",N[Ex,40]," , ",N[Ey,40]]
- (*Print["F:",N[Fx,40]," , ",N[Fy,40]]
- Print["G:",N[Gx,40]," , ",N[Gy,40]]
- Print["H:",N[Hx,40]," , ",N[Hy,40]]*)
- Print["P:",N[Px,40]," , ",N[Py,40]]
- Print["K:",N[Kx,40]," , ",N[Ky,40]]
- Print["Y:",N[Yx,40]," , ",N[Yy,40]]
- Print["T:",N[Tx,40]," , ",N[Ty,40]]
- Print["\n计算结果 角TYK= ",N[TYK,40]," 度"]
- Print["--- end ---"]
复制代码
验算用全部点的坐标按sheng_jianguo公式计算高精度数值)
A:0 , 0
B:0.2773856573457319180388164846771671225063 , 0.2773856573457319180388164846771671225063
C:1.000000000000000000000000000000000000000 , 0
D:0.1563595206991933912656890164116462907359 , 0.1563595206991933912656890164116462907359
E:0.4809858543603847813344377298593593481903 , 0.1992308641856816527726382705877690645024
P:0.3091289115808391643999661835655612179945 , 0.1280453876984169075874796922378977584362
K:0.2557161458403341375559839460607672901932 , 0.2041875026349792295598721686121115113072
Y:0.2180590475407362821176241619401935696729 , 0.1091555736501021257066687220541582145555
T:0.2259752645355681121288712957641149097994 , 0
计算结果 角TYK= 154.2357284163737151883897130305920226140 度
带有答案的图片: |
-
含答案的大图
|