#NEWLINE# def test_fancy_mesh( ) : #NEWLINE# #INDENT# 'Create a fancy looking mesh using mesh (example taken from octaviz).' #NEWLINE# pi = numpy . pi #NEWLINE# cos = numpy . cos #NEWLINE# ( du , dv ) = ( ( pi / 20.0 ) , ( pi / 20.0 ) ) #NEWLINE# ( u , v ) = numpy . mgrid [ 0.01 : ( pi + ( du * 1.5 ) ) : du , 0 : ( ( 2 * pi ) + ( dv * 1.5 ) ) : dv ] #NEWLINE# x = ( ( ( ( 1 - cos ( u ) ) * cos ( ( u + ( ( 2 * pi ) / 3 ) ) ) ) * cos ( ( v + ( ( 2 * pi ) / 3.0 ) ) ) ) * 0.5 ) #NEWLINE# y = ( ( ( ( 1 - cos ( u ) ) * cos ( ( u + ( ( 2 * pi ) / 3 ) ) ) ) * cos ( ( du - ( ( 2 * pi ) / 3.0 ) ) ) ) * 0.5 ) #NEWLINE# z = ( - cos ( ( u - ( ( 2 * pi ) / 3.0 ) ) ) ) #NEWLINE# m = mesh ( x , y , z , representation = 'fancymesh' , tube_radius = 0.0075 , colormap = 'RdYlGn' ) #NEWLINE# return m