#NEWLINE# def setup( self ) : #NEWLINE# #INDENT# data = [ ] #NEWLINE# shape = pg . Plane ( ( 0 , 0 , 0 ) , ( 0 , 0 , 1 ) , 0.5 , False ) #NEWLINE# for _ in xrange ( COUNT ) : #NEWLINE# #INDENT# x = ( ( random . random ( ) - 0.5 ) * FIELD_SIZE ) #NEWLINE# y = ( ( random . random ( ) - 0.5 ) * FIELD_SIZE ) #NEWLINE# z = ( random . random ( ) * FIELD_DEPTH ) #NEWLINE# mesh = ( pg . Matrix ( ) . translate ( ( shape , y , z ) ) * shape ) #NEWLINE# data . extend ( mesh . positions ) #NEWLINE# #UNINDENT# self . context = pg . Context ( pg . SolidColorProgram ( ) ) #NEWLINE# self . context . position = pg . VertexBuffer ( data )