求5800坐标反算和正算程序

初学求卡西欧5800坐标反算一个小程序
2024-12-04 01:17:47
推荐回答(1个)
回答1:

1.主程序(TYQXjs)
"1.SZ => XY":"2.XY => SZ":N:U"X0":V"Y0":O"S0":G"F0":H"LS":P"R0":R"RN":Q:C=1÷P:D=(P-R)÷(2HPR):E=180÷π:N=1=>Goto 1:≠>Go to 2Δ←┘
Lbl 1:{SZ}:SZ:W=Abs(S-O):Prog "SUB1":X"XS"=X◢
Y"YS"=Y◢
Goto 1←┘
Lbl 2:{XY}:XY:I=X:J=Y:Prog "SUB2":S"S"=O+W◢
Z"Z"=Z◢
Goto 2

2. 正算子程序(SUB1)
A=0.1739274226:B=0.3260725774:K=0.0694318442:L=0.3300094782:F=1-L:M=1-K:X=U+W(Acos(G+QEKW(C+KWD))+Bcos(G+QELW(C+LWD))+Bcos(G+QEFW(C+FWD))+Acos(G+QEMW(C+MWD))):Y=V+W(Asin(G+QEKW(C+KWD))+Bsin(G+QELW(C+LWD))+Bsin(G+QEFW(C+FWD))+Asin(G+QEMW(C+MWD))):
F=G+QEW(C+WD)+90:
X=X+ZcosF:Y=Y+ZsinF
3. 反算子程序(SUB2)
T=G-90:W=Abs((Y-V)cosT-(X-U)sinT):Z=0:Lbl 0:Prog "SUB1":L=T+QEW(C+WD):Z=(J-Y)cosL-(I-X)sinL:AbsZ<1E-6=>Goto1:≠>W=W+Z:Goto 0Δ←┘
Lbl 1:Z=0:Prog "SUB1":Z=(J-Y)÷sinF