[init] CLS:PRINT:PRINT PRINT" 2D irregular shape area from X|Y coordinates, 1984-2005 Bill Yotter" PRINT" Program revised from: ZX81 BASIC to GWBASIC to APBASIC to JustBASIC" PRINT"" PRINT" Setup:" PRINT"" PRINT" Draw a square grid over your shape. The grids size and the" PRINT" number of data points you use will dictate the resolution." PRINT"" PRINT" Now enter the X,Y coordinates of the outside diameter of your" PRINT" shape, you may move around the perimeter in either direction." PRINT" Enter 0's as the last set of coordinates to display results." PRINT"" A=1:X=1 [coords] LOCATE 15,15:PRINT "Coordinates #";X;:INPUT " X= ";B:LOCATE 40,15:INPUT " Y= ";C LOCATE 15,15:PRINT " " IF B=0 OR C=0 THEN [results] GOSUB [check]:X=X+1:GOTO [coords] [results] LOCATE 15,16:PRINT"The square area = ";ABS(E);" input units":GOSUB [reset] LOCATE 15,18:INPUT"Another Caculation ? ";A$ IF LEFT$(A$,1)="Y" OR LEFT$(A$,1)="y" THEN [init] ELSE END [check] IF A=1 THEN [firstcoord] E=F+G*C-H*B:F=E:G=B:H=C:E=(E+B*J-I*C)*.5:RETURN [firstcoord] I=B:J=C:A=0:F=0:E=0:G=B:H=C:RETURN [reset] A=0:B=0:C=0:E=0:F=0:G=0:H=0:I=0:J=0:A$="":RETURN