Compucolor.org – Virtual Media

Listing of file='REC.BAS;01' on disk='vmedia/demos2-sector.ccvf'

10 PLOT 29,18,30,16,12
20 PRINT TAB( 218)"RECTANGLES"
25 FOR I= 1TO 700:NEXT
30 GOTO 62
40 PLOT 10,10,10,25,25:INPUT "LENGTH ?";L:INPUT "HIGHT ?";H
50 INPUT "OBSERVER DISTANCE (GREATER THAN LENGTH) ?";D
55 INPUT "ANGLEINCREMENTS DEGS ?";A
60 INPUT "CENTRE COORDS (X0,Y0) ?";X0,Y0
62 L= 100:H= 60
63 D= 200
64 A= 12:X0= 63:Y0= 63
70 B= 0
75 R= B* 3.14159/ 180
77 PLOT 12
80 L1= L* COS (R)
82 H1= H* D/ (D- L* SIN (R))
85 H2= H* D/ (D+ L* SIN (R))
90 X1= X0- INT (0.5* L1):X2= X0+ INT (0.5* L1)
100 Y1= Y0- INT (0.5* H1):Y2= Y0+ INT (0.5* H1)
110 Y3= Y0+ INT (0.5* H2):Y4= Y0- INT (0.5* H2)
115 IF B/ 180= INT (B/ 180)THEN PLOT 12
116 PLOT 30,16
117 IF B> = 540THEN PLOT 30,22
118 IF B= > 720THEN B= 0
119 IF B= 540THEN PLOT 12
120 PLOT 29,20,2,X1,Y2,242,X2,Y3,253,X2,Y4,242,X1,Y1,255
130 PLOT 29,17,2,X2,Y3,242,X2,Y4,255
136 PLOT 29,19,2,X1,Y1,242,X1,Y2,255
140 B= B+ A:R= B* (3.14159/ 180)
145 K= K+ 1
146 IF K= 120THEN GOTO 155
150 GOTO 80
155 LOAD "MENU":RUN 30