THE PAST MASTER CLUB
3D GRAPH ROTATED.HTM






'' 3DTTT.BAS DESIGNED 1998 TRANSLATED OCT99 û
'' THESE WERE DESIGNED IN THE DAYS OF SAVING MEMORY AND A LETTER SAVED
'' ATLEAST 4 T0 5 BYTES - I STILL USE THE METHOD WHERE APPLICABLE!

SCREEN 13 '320x200 256 colors

CLS

10 '' SCREEN 7 '9 '1
20 PI = 7 * .4488
30 CLS
40 COLOR 13 ', 3 '4=RED5=PINK7LGREEN
50 FOR OO = -10 TO -40 STEP -10
60 MIN2 = 400
70 CLS
80 LOCATE 1, 1
90 PRINT "@"; -OO; "DEGREES PI="; PI; "R1="
100 O = OO * PI / 180
110 FOR A = -50 TO 50
120 MIN = 400
130 FOR B = 52 TO -52 STEP -4
140 X = A
150 Y = B
160 Z = 0
170 R = SQR(A * A + B * B)
180 LOCATE 1, 30
190 PRINT R
200 IF R <> 0 THEN Z = -111 * SIN(R / 3) / R
A1 = R / 3 MOD (2 * PI): ' RED LGRN
IF (A1 >= PI / 2 AND A1 <= 3 * PI / 2) THEN CLR = 12 ELSE CLR = 10
210 IF R = 0 THEN Z = MIN2
220 YY = B * COS(O + PI / 4) + Z * SIN(O + PI / 4)
230 ZZ = -B * SIN(O + PI / 4) + Z * COS(O + PI / 4)
240 X = 140 + X
250 Y = 100 + YY + ZZ
260 IF Z < MIN2 THEN MIN2 = Z - 6
270 IF Y > MIN THEN GOTO 320
280 MIN = Y
290 PSET (X, Y), CLR '1BLUE7CYAN14YELLOW13LPINK12LRED11LCYAN10LGREEN9LBLUE
300 IF R < 20 THEN PSET (X, Y + 1), 1
310 IF R < 20 THEN PSET (X, Y - 1), 1
320 NEXT B
330 NEXT A
340 NEXT OO
350 'Z-AXIS ROTATION
360 PI = 7 * .4488
370 FOR OO = 10 TO 50 STEP 10
380 MIN2 = 400
390 CLS
400 LOCATE 1, 1
410 PRINT "@"; OO; "DEGREES PI="; PI; " R2="
420 O = OO * PI / 180
430 FOR A = -50 TO 50
440 MIN = 400
450 FOR B = 52 TO -52 STEP -4
460 X = A * COS(O) + B * SIN(O)
470 Y = -A * SIN(O) + B * COS(O)
480 Z = 0
490 R = SQR(A * A + B * B)
500 LOCATE 1, 30
510 PRINT R
520 IF R <> 0 THEN Z = -111 * SIN(R / 3) / R
A1 = R / 3 MOD (2 * PI): ' RED LGRN
IF (A1 >= PI / 2 AND A1 <= 3 * PI / 2) THEN CLR = 12 ELSE CLR = 10
530 IF R = 0 THEN Z = MIN2
540 X = 140 + X
550 Y = 100 + Y + Z
560 IF Z < MIN2 THEN MIN2 = Z - 6
570 IF Y > MIN THEN GOTO 620
580 MIN = Y
600 IF R < 20 THEN PSET (X, Y + 1), CLR
610 IF R < 20 THEN PSET (X, Y - 1), CLR
620 NEXT B
630 NEXT A
640 NEXT OO
650 INPUT "HIT ENTER TO EXIT!", U$
660 '' SCREEN 2
670 '' SCREEN 0,0,0
680 '' CHAIN"GAME
690 '' END
700 '' SAVE"srfc

END



RETURN TO TOP
PREVIOUS MENU
RETURN TO PMC MENU
HOME PAGE
You are visitor no. to this page.
1