'=========================================================================== ' Subject: 3D WAVE PATTERN Date: 08-13-97 (08:25) ' Author: Davey W. Taylor Code: QB, QBasic, PDS ' Origin: audio.squad@mailbox.swipnet.se Packet: GRAPHICS.ABC '=========================================================================== 'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ--ÄÄÄ--Ä -ù ù '³ ** 3D WAVE PATTERN ** '³ Created by Davey W Taylor '³ '³ This is the original pattern I used for the 3d-flag program. '³ I would like to know if it is possible to map an image to '³ this pattern using pure basic (no asm). I'm not looking for '³ speed, just a good, working program! '³ Anyway, if you use this pattern directly or as a base for '³ some other graphical thingy, I would appreciate if you mention '³ my name... So if you have some code for the image mapping, email! '³ '³ NOTE: This program uses real time calculation for the pixel pos's '³ precalculating this into an array would increase the speed '³ tremendously! I simply didn't have the time or will... '³ '³ ALSO! THE 3D-FLAG EDITOR IS DONE! YOU CAN DOWNLOAD THE PROGRAM AT '³ http://dix.dubna.ru/flagdraw/ '³ I WILL RELEASE THE SOURCE IN THE NEXT PACKAGE... 'ÀÄÄÄÄÄ--ÄÄù- ù ù ' ** If you have any comments / suggestions / questions, my email is: ** ' ** audio.squad@mailbox.swipnet.se ** SCREEN 1 CONST pi2! = 6.283186 'pi * 2 CONST speed! = .1 'flag speed CONST movement% = 2 'movement amount CONST space% = 10 'space between pixels CONST startx% = 100 'start x coord. of flag CONST starty% = 70 'start y coort. of flag CONST xsize% = 10 'amount of horiz. pixels CONST ysize% = 5 'amount of vert. pixels CONST wavem! = 1 'waves multiplier DIM d!(1 TO xsize%, 1 TO ysize%) FOR x% = 1 TO xsize% FOR y% = 1 TO ysize% d!(x%, y%) = (x% + y%) / wavem! DO WHILE d!(x%, y%) > pi2! d!(x%, y%) = d!(x%, y%) - pi2! LOOP NEXT y% NEXT x% DO ' WAIT &H3DA, 8 'make it not so fast... FOR x% = 1 TO xsize% FOR y% = 1 TO ysize% d!(x%, y%) = d!(x%, y%) + speed! 'calc. and draw pixels PSET (startx% + (x% * space%) + (COS(d!(x%, y%) - speed!) * movement%), starty% + (y% * space%) + (SIN(d!(x%, y%) - speed!) * movement%)), 0 PSET (startx% + (x% * space%) + (COS(d!(x%, y%)) * movement%), starty% + (y% * space%) + (SIN(d!(x%, y%)) * movement%)), 15 IF d!(x%, y%) > pi2! THEN d!(x%, y%) = d!(x%, y%) - pi2! NEXT y% NEXT x% LOOP WHILE INKEY$ = ""