Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0 REM ANGLE.BAS, KIND OF DOES WHAT HPLOT DOES IN GR MODE.
- 10 HOME:GR:SX=0:SY=6:EX=36:EY=0:COLOR=4:ONERR GOTO 400
- 20 CX=EX-SX:CY=EY-SY
- 30 GOSUB 300
- 40 IF ABS(CX) >= ABS(CY) GOTO 100
- 50 IF ABS(CY) > ABS(CX) GOTO 200
- 60 GOTO 400
- 100 TSX=SX:TEX=TSX+INT(ABS(CX)/ABS(CY))*XSTEP
- 110 FOR I = SY TO EY STEP YSTEP
- 120 FOR J = TSX TO TEX STEP XSTEP
- 130 IF J = EX GOTO 400
- 140 PLOT J,I
- 150 NEXT J
- 160 TSX=TEX:TEX=TSX+INT(ABS(CX)/ABS(CY))*XSTEP
- 170 NEXT I
- 180 GOTO 400
- 200 TSY=SY:TEY=TSY+INT(ABS(CY)/ABS(CX))*YSTEP
- 210 FOR I = SX TO EX STEP XSTEP
- 220 FOR J = TSY TO TEY STEP YSTEP
- 230 IF J = EY GOTO 400
- 240 PLOT I,J
- 250 NEXT J
- 260 TSY=TEY:TEY=TSY+INT(ABS(CY)/ABS(CX))*YSTEP
- 270 NEXT I
- 280 GOTO 400
- 300 IF CX > 0 THEN XSTEP=1
- 310 IF CX < 0 THEN XSTEP=-1
- 320 IF CY > 0 THEN YSTEP=1
- 330 IF CY < 0 THEN YSTEP=-1
- 340 RETURN
- 400 PRINT CX;",";CY:COLOR=3:PLOT SX,SY:PLOT EX,EY:END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement