5800计算机程序
AD----INTERSECT
(用夹位角和距离反坐标)
,Fix 6
“XA=”?A:“YA=”?B:“XB=”?C:“YB=”?D:
,Lbl 0:“DA=,0END”?E ,
,E=0Goto 1 ,
,“DB=”?F:“ANGLE=”?K
22222222((A-C)+(B-D)?H:E+H-F?L:F+H-E?M:2EH?N:2FH?
-10:cos(M?0)?Q:K+P+Q-180?G:tan(P-G?3)?P:tan(Q-G?3)
,?Q:Prog“INTERSEC”:
“X=”:X?
“Y=”:Y?
,Goto 0
,Lbl 1:“AD--INTERSEGTEND” ,
,
D----QFFSET
,Fix 6:
,“X0=”?X:“Y0=”?Y:Lbl 1:“P=”?P:“J=”?J:“S=”?S:
If P=1:Then “A=”:X+Scos(J)? “B=”:Y+Ssin(J)?
,Goto 2:IfEnd
If P=2:Then“A=”:X+Scos(J+90)? “B=”:Y+Ssin(J+90)?
,Goto 2:IfEnd
If P=3:Then“A=”:X+Scos(J+180)? “B=”:Y+Ssin(J+180) ?
,Goto 2:IfEnd
If P=4:Then“A=”:X+Scos(J+270)? “B=”:Y+Ssin(J+270) ?
,Goto 2:IfEnd
,Lbl 2:Goto 1
,
DD
,Deg:Fix 6
,“X0=”?U:“Y0=”?Z:“X1=”?K:“Y1=”?L:
,Lbl 0:“A0=”?A
,“B0=”?B
,K-U?C:L-Z?D:
22,(C+D) ?I:
,Prog“DSS”:
22,(A+B) ?E:
,Prog“DS”:
,J+R?T:T,360T-360?T:U+Ecos(T)?X:Z+Esin(T)?Y: ,
“X=”:X?
“Y=”:Y?
“I=”:I?
“J=”:J?DMS? “E=”:E?
“R=”:R?DMS?
,Goto 0
,Lbl 3:“DDEND” ,
,
D1
,Deg:Fix 6
“X0=”?U: “Y0=”?Z:
“X1=”?K: “Y1=”?L:
,Lbl 0:“A0=”?A
,“B0=”?B
22(A+B) ?E:K-U?C:L-Z?D:Pol(C,D):J,0J+360?,
,J:Prog“DSSS”:J+R?H:U+Ecos(H) ?X:Z+Esin(H) ?Y:
“X=”:X?
“Y=”:Y?
,Goto 0
,Lbl 1:“D1END” ,
DS(子程)
,If A=0:Then If B,0:Then 90?R:IfEnd:
,Goto 1:IfEnd
-1,tan(B?A)?R
,If A,0:Then R+180?R:
,Goto 1:IfEnd
,B,0R+360?R ,
,Lbl 1
DSS
,If C=0:Then If D,0:Then 90?J:Else 270?JThen:
,Goto 1:IfEnd
-1,tan(D?C)?J
,If C,0:Then J+180?J:Goto 1:
,If D,0:Then J+360?J:IfEnd
,Lbl 1
DSSS
,If A=0:Then If B,0:Then 90?R:Else 270?R:IfEnd:
,Goto 1:IfEnd
-1,tan(B?A)?R
,If A,0:Then R+180?R:
,Goto 1: IfEnd
,If B,0:Then R+360?R:IfEnd
,Lbl 1
,