Random Plot

Date: 198x
Type: Program
Platform(s): TS 1000

Content

Appears On

Assembled by Tim Ward from many sources. Contains programs 10294-10335.

Related Products

Related Articles

Related Content

Image Gallery

Random Plot

Source Code

  10 LET A=INT (RND*62)+1
  20 LET B=INT (RND*42)+1
  25 FOR P=1 TO 25
  30 LET C=INT (RND*62)+1
  40 LET D=INT (RND*42)+1
  45 GOSUB 1000
  50 LET A=C
  60 LET B=D
  70 NEXT P
\n1000 LET U=C-A
\n1005 REM U
\n1010 LET V=D-B
\n1015 REM V
\n1020 LET D1X=SGN U
\n1030 LET D1Y=SGN V
\n1035 REM (D1X,D1Y)
\n1040 LET D2X=SGN U
\n1050 LET D2Y=0
\n1055 REM (D2X,D2Y)
\n1060 LET M=ABS U
\n1070 LET N=ABS V
\n1080 IF M>N THEN GOTO 1130
\n1090 LET D2X=0
\n1100 LET D2Y=SGN V
\n1105 REM (D2X,D2Y)
\n1110 LET M=ABS V
\n1120 LET N=ABS U
\n1130 REM 
\n1140 LET S=INT (M/2)
\n1145 REM 
\n1150 FOR L=0 TO M
\n1160 PLOT A,B
\n1170 LET S=S+N
\n1180 IF S<M THEN GOTO 1230
\n1190 LET S=S-M
\n1200 LET A=A+D1X
\n1210 LET B=B+D1Y
\n1215 REM 
\n1220 GOTO 1250
\n1230 LET A=A+D2X
\n1240 LET B=B+D2Y
\n1245 REM 
\n1250 NEXT L
\n1260 RETURN 
\n1270 CLEAR 
\n1280 SAVE "1030%4"
\n1290 RUN 

People

No people associated with this content.

Scroll to Top