<s> """<STR_LIT>""" <EOL> import numpy <EOL> from mayavi import mlab <EOL> def lorenz ( x , y , z , s = <NUM_LIT> , r = <NUM_LIT> , b = <NUM_LIT> / <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> u = s * ( y - x ) <EOL> v = r * x - y - x * z <EOL> w = x * y - b * z <EOL> return u , v , w <EOL> x , y , z = numpy . mgrid [ - <NUM_LIT:50> : <NUM_LIT:50> : <NUM_LIT> , - <NUM_LIT:50> : <NUM_LIT:50> : <NUM_LIT> , - <NUM_LIT:10> : <NUM_LIT> : <NUM_LIT> ] <EOL> u , v , w = lorenz ( x , y , z ) <EOL> fig = mlab . figure ( size = ( <NUM_LIT> , <NUM_LIT> ) , bgcolor = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> f = mlab . flow ( x , y , z , u , v , w , line_width = <NUM_LIT:3> , colormap = '<STR_LIT>' ) <EOL> f . module_manager . scalar_lut_manager . reverse_lut = True <EOL> f . stream_tracer . integration_direction = '<STR_LIT>' <EOL> f . stream_tracer . maximum_propagation = <NUM_LIT:200> <EOL> src = f . mlab_source . m_data <EOL> e = mlab . pipeline . extract_vector_components ( src ) <EOL> e . component = '<STR_LIT>' <EOL> zc = mlab . pipeline . iso_surface ( e , opacity = <NUM_LIT:0.5> , contours = [ <NUM_LIT:0> , ] , <EOL> color = ( <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT> ) ) <EOL> zc . actor . property . backface_culling = True <EOL> mlab . view ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] ) <EOL> mlab . show ( ) </s>
