TGC Codebase Backup



Circles by Richard Davey

25th Sep 2003 19:39
Summary

Original code by: BigGun - dmartin@cnl.com.au - http://www.thebiggun.com. Updated by Requiem and Hubdule. Generates really quite lovely patterns!!



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `	------------------------------------------------------------------------
`	Circles                                   DarkForge Snippet (11/10/2000)
`	------------------------------------------------------------------------
`	Original code by: BigGun - dmartin@cnl.com.au - http://www.thebiggun.com
`	Updated by Requiem and Hubdule. Generates really quite lovely patterns!!

hide mouse
sync rate 0
sync on

create bitmap 1,640,480

t#=timer()

for a = 1 to 200

	for i = 1 to 360

		x=320+cos(i)*a : y=240+sin(i)*a
		randomize timer()
		c=i*rnd(65535)

`		Uncomment the ink commands for different styles
`		ink c,0
`		ink rgb(c,int(c/12),int(c/20)),0
`		ink rgb(int(c/12),int(c/6),255),0
		ink rgb(int(c/6),255,int(c/6)),0

		dot x,y

	next i

`	Comment out these lines for extra speed (but a longer black screen)
	copy bitmap 1,0
	sync

next a

blur bitmap 1,2

ink rgb(255,255,255),0
set cursor 0,0 : print "Image generated in ";(timer()-t#)/1000;" seconds"

copy bitmap 1,0

repeat
	sync
until spacekey()