CEC辅助教学程序——抛物线
10 HG R:HCOLOR=3
20 HPLOT0,80 TO 279,80 TO 274,77
30 HPLOT 134,5 TO 136,0 TO 136,159
40 PRINT"(1)Y^2=2 PX","(2)Y^2=-2PX"
50 PRINT"(3)X^2=2 PY",:(4)X^2=-2PY"
60 GETA$:PRINT"(";A$;")"
70 T=VAL(A$):N=(-1)^(T+1)
80 INPUT“P=”;P:P=P*N
90 IF T>2 THEN 200100HPLOT 136-P/2,20 TO 136-P/2,140
110 HPLOT 136+P/2,77 TO 136+P/2,83
120 FORX=136 TO 136+100* N STEPN
130 Y=SQR(2*P*(X-136))
140 HPLOTX,80-Y
150 HPLOTX,80+Y
160 IF 80+Y>=155 OR 80-Y<=4 THEN 180
170 NEXT X
180 END 200 HPLOT 50,80+P/2 TO 230,80+P/2210 HPLOT133,80-P/2 TO 139,80-P/2
220 FOR Y=80 TO 80-70*NSTEP-N
230 X=SQR(2*P*(80-Y))
240 HPLOT 136-X,Y
250 HPLOT 136+X,Y
260 IF 136+X>=275 OR 136-X<=4 THEN 280
270 NEXT Y
280 END
(湖北 成国喜)