home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG067.ARC
/
MANDALA.BAS
< prev
next >
Wrap
BASIC Source File
|
1979-12-31
|
2KB
|
79 lines
0 REM M A N D A L A
1 REM
2 REM MANDALA REDONE VER 1.3 9/20/76 ROB C/GCC III
10 DIM C$(6),A$(3)
12 C$ ="*. $#"
14 P1=3.14159
22 PRINT
24 PRINT" ** YOU ** DESIGN A MANDALA BY TYPING IN SOME NUMBERS."
26 PRINT
100 REM ** INITIAL DIALOG **
110 PRINT
120 PRINT "SIZE OF MANDALA IN INCHES ";
130 INPUT S
135 LET S8=S
140 IFS>=1 AND S<=7THEN 180
150 PRINT "MANDALAS CAN BE BETWEEN 1 AND 7 INCHES."
160 PRINT "SIZE ";
170 GOTO 130
180 S=INT(2.5*S-.5)
190 PRINT "DIP FREQUENCY AND IMPORTANCE ";
200 INPUT F1,C1
205 LET F8=F1:C8=C1
210 PRINT "RIPPLE FREQUENCY AND IMPORTANCE ";
220 INPUT F2,C2
225 LET F9=F2:C9=C2
230 PRINT "COMBINATION IMPORTANCE ";
240 INPUT C3
245 LET C7=C3
250 PRINT
260 PRINT"HERE IS YOUR MANDALA :"
270 PRINT
280 REM *** PARAMETER NORMALIZATION ***
290 F1=INT(F1+.5)
300 F2 =INT(F2+.5)
310 C1=ABS(C1)
320 C2=ABS(C2)
330 C3=ABS(C3)
340 C=C1+C2+C3
350 C1=3*C1/C
360 C2=3*C2/C
370 C3=3*C3/C
380 PRINT
1000 REM *** PRINTING LOOP ***
1010 FOR Y=S TO -S STEP -1
1020 Y2=Y*Y
1030 REM FIND EDGE
1040 X1=S
1050 X2=-S
1060 X3=-1
1070 FOR X=X1 TO X2 STEP X3
1080 R=SQR(X*X+Y2)/S
1090 IF X <> O THEN 1120
1100 A=P1* SGN(Y)/2
1110 GOTO 1150
1120 A=ATN(Y/X)
1130 IF X>0 THEN 1150
1140 A=A+P1
1150 G1=SIN(F1*A)
1160 G2=SIN(F2*R*P1)
1170 Q=INT(C1*G1+C2*G2+C3*G1*G2+3)+1
1180 IF X3=1 THEN1250
1190 IF Q=3 ORQ=4 THEN 1260
1200 REM FOUND EDGE
1210 X1=-S
1220 X2=X
1230 X3=1
1240 GOTO 1070
1250 PRINT MID$(C$,Q,1);MID$(C$,Q,1);
1260 NEXT X
1270 PRINT
1280 NEXTY
1290 PRINT
1295 PRINTS8;F8;C8;F9;C9;C7
1300 PRINT "HERE WE GO AGAIN...."
1310 GOTO 100
9999 END