#!/usr/local/bin/cz --
use b

Main()
	space()
#	space(1280, 800)
	qmath_init()
	bm_enabled = 1
	bm_start()
	with_pixel_type(pretty)
	gr_free()

def pretty(pixel_type)
	int da = 0
	int dr = 0

	repeat
		bm_start()
		pixel_type *px = pixel()
		da+=2

		int y
		for y=h_2-1; y>=-h_2; --y
			int r2 = w_2*w_2 + y*y
			for(x, -w_2, w_2)
				int a

				num s, atn
				qSin(s, r2/100.0+dr)
				qAtan2(atn, y, x)
				mod_fast(a, atn+s*50+da, 360)

				*px++ = rb[a]

				r2 += 2*x+1   # maintain r2 = x*x+y*y

		Paint()
#		bm_ps("painted")
#		csleep(4)
		break
	event_loop()

def screen_trans fast
