#NEWLINE# def draw( ) : #NEWLINE# #INDENT# ( vx , vy ) = ( [ ] , [ ] ) #NEWLINE# for i in range ( numBlobs ) : #NEWLINE# #INDENT# blogPx [ i ] += blogDx [ i ] #NEWLINE# blogPy [ i ] += blogDy [ i ] #NEWLINE# if ( blogPx [ i ] < 0 ) : #NEWLINE# #INDENT# blogDx [ i ] = 1 #NEWLINE# #UNINDENT# if ( blogPx [ i ] > pg . width ) : #NEWLINE# #INDENT# blogDx [ i ] = ( - 1 ) #NEWLINE# #UNINDENT# if ( blogPy [ i ] < 0 ) : #NEWLINE# #INDENT# blogDy [ y ] = 1 #NEWLINE# #UNINDENT# if ( blogPy [ i ] > pg . height ) : #NEWLINE# #INDENT# blogDy [ i ] = ( - 1 ) #NEWLINE# #UNINDENT# vx . append ( tuple ( ( sq ( ( blogPx [ i ] - x ) ) for x in xrange ( pg . width ) ) ) ) #NEWLINE# vy . append ( tuple ( ( sq ( ( blogPy [ i ] - y ) ) for y in xrange ( pg . height ) ) ) ) #NEWLINE# #UNINDENT# pg . beginDraw ( ) #NEWLINE# for y in range ( pg . height ) : #NEWLINE# #INDENT# for x in range ( pg . width ) : #NEWLINE# #INDENT# m = 1 #NEWLINE# for i in range ( numBlobs ) : #NEWLINE# #INDENT# m += ( 60000 / ( ( vy [ i ] [ y ] + vx [ i ] [ x ] ) + 1 ) ) #NEWLINE# pg . set ( x , y , color ( 0 , ( m + x ) , ( ( ( x + m ) + y ) / 2 ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# pg . endDraw ( ) #NEWLINE# image ( pg , 0 , 0 , width , height )