'=========================================================================== ' Subject: SIN/COS/ATN/SQR CIRCLES Date: 12-20-97 (10:33) ' Author: Alexander Meyer Code: QB, QBasic, PDS ' Origin: Meyer.Karl@t-online.de Packet: GRAPHICS.ABC '=========================================================================== ' //// ' 0(o o)0 '-------------------------ooO (_) Ooo--------------------- ' SINCOSC.BAS -- Written in QuickBasic 4.5 ' ' Name: SIN/COS/ATN/SQR circles ' Author: Alexander Meyer ' Date: 11-23-1997 ' Description: Circles with sine (SIN), cosine (COS), ' arcustangent (ATN) and square root (SQR) ' 'For questions or comments mail to: Meyer.Karl@t-online.de '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SCREEN 7 RANDOMIZE TIMER '***** Kreis zeichnen ***** Next0: CLS DO FOR Winkel = 0 TO 3.18 STEP .01 CS% = 50 * COS(Winkel) SN% = 50 * SIN(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN GOTO Next1 NEXT Winkel LOOP Next1: CLS DO FOR Winkel = 0 TO 3.18 STEP .01 CS% = 50 * ATN(Winkel) SN% = 50 * ATN(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN GOTO Next2 NEXT Winkel LOOP Next2: CLS DO FOR Winkel = 0 TO 4.8 STEP .01 CS% = 50 * ATN(Winkel) SN% = 50 * COS(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN GOTO Next3 NEXT Winkel LOOP Next3: CLS DO FOR Winkel = 0 TO 6.5 STEP .01 CS% = 50 * ATN(Winkel) SN% = 50 * SIN(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN GOTO Next4 NEXT Winkel LOOP Next4: CLS DO FOR Winkel = 0 TO 3.18 STEP .01 CS% = 50 * SIN(Winkel) SN% = 50 * SQR(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN GOTO Next5 NEXT Winkel LOOP Next5: CLS DO FOR Winkel = 0 TO 3.18 STEP .01 CS% = 50 * SIN(Winkel) SN% = 50 * SIN(Winkel) CIRCLE (100 + CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 + SN%), 20, INT(RND * 14 + 1) CIRCLE (100 + CS%, 100 - SN%), 20, INT(RND * 14 + 1) CIRCLE (100 - CS%, 100 - SN%), 20, INT(RND * 14 + 1) IF INKEY$ <> "" THEN END NEXT Winkel LOOP