#NEWLINE# @ classmethod #NEWLINE# def _make_specification( cls ) : #NEWLINE# #INDENT# 'Return a dict that describes this supershape.' #NEWLINE# side = 1.0 #NEWLINE# h = ( side * math . sin ( ( math . pi / 3.0 ) ) ) #NEWLINE# top_rail = 0.0 #NEWLINE# bottom_rail = h #NEWLINE# left_rail = ( ( - 0.5 ) * side ) #NEWLINE# midleft_rail = 0.0 #NEWLINE# midright_rail = ( 0.5 * side ) #NEWLINE# right_rail = side #NEWLINE# left_pt = ( bottom_rail , left_rail ) #NEWLINE# topleft_pt = ( top_rail , midleft_rail ) #NEWLINE# bottomright_pt = ( bottom_rail , midright_rail ) #NEWLINE# topright_pt = ( top_rail , right_rail ) #NEWLINE# c = { #NEWLINE# #INDENT# ( 0 , 0 ) : { #NEWLINE# #INDENT# 'name' : 'up' , #NEWLINE# 'clockwise_edge_names' : ( 'left' , 'right' , 'bottom' ) , #NEWLINE# 'edges' : { #NEWLINE# #INDENT# ( 0 , ( - 1 ) ) : { #NEWLINE# #INDENT# 'name' : 'left' , #NEWLINE# 'counter_vertex' : left_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# ( 0 , 1 ) : { #NEWLINE# #INDENT# 'name' : 'right' , #NEWLINE# 'counter_vertex' : topleft_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# ( 1 , ( - 1 ) ) : { #NEWLINE# #INDENT# 'name' : 'bottom' , #NEWLINE# 'counter_vertex' : bottomright_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# ( 0 , 1 ) : { #NEWLINE# #INDENT# 'name' : 'down' , #NEWLINE# 'clockwise_edge_names' : ( 'left' , 'top' , 'right' ) , #NEWLINE# 'edges' : { #NEWLINE# #INDENT# ( 0 , 0 ) : { #NEWLINE# #INDENT# 'name' : 'left' , #NEWLINE# 'counter_vertex' : bottomright_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# ( ( - 1 ) , 2 ) : { #NEWLINE# #INDENT# 'name' : 'top' , #NEWLINE# 'counter_vertex' : topleft_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# ( 0 , 2 ) : { #NEWLINE# #INDENT# 'name' : 'right' , #NEWLINE# 'counter_vertex' : topright_pt , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# d = { #NEWLINE# #INDENT# 'name' : 'Triangle' , #NEWLINE# 'reference_length' : side , #NEWLINE# 'graph_offset_per_row' : ( h , ( 0.5 * side ) ) , #NEWLINE# 'graph_offset_per_col' : ( 0.0 , ( 0.5 * side ) ) , #NEWLINE# 'components' : c , #NEWLINE# #UNINDENT# } #NEWLINE# return d