def cube():
 vtype = [('a_position', np.float32, 3), ('a_normal', np.float32, 3), ('a_color', np.float32, 4)]
 v = [[1, 1, 1], [(-1), 1, 1], [(-1), (-1), 1], [1, (-1), 1], [1, (-1), (-1)], [1, 1, (-1)], [(-1), 1, (-1)], [(-1), (-1), (-1)]]
 n = [[0, 0, 1], [1, 0, 0], [0, 1, 0], [(-1), 0, 1], [0, (-1), 0], [0, 0, (-1)]]
 c = [[0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1], [0, 1, 0, 1], [1, 1, 0, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 0, 1]]
 V = np.array([(v[0], n[0], c[0]), (v[1], n[0], c[1]), (v[2], n[0], c[2]), (v[3], n[0], c[3]), (v[0], n[1], c[0]), (v[3], n[1], c[3]), (v[4], n[1], c[4]), (v[5], n[1], c[5]), (v[0], n[2], c[0]), (v[5], n[2], c[5]), (v[6], n[2], c[6]), (v[1], n[2], c[1]), (v[1], n[3], c[1]), (v[6], n[3], c[6]), (v[7], n[3], c[7]), (v[2], n[3], c[2]), (v[7], n[4], c[7]), (v[4], n[4], c[4]), (v[3], n[4], c[3]), (v[2], n[4], c[2]), (v[4], n[5], c[4]), (v[7], n[5], c[7]), (v[6], n[5], c[6]), (v[5], n[5], c[5])], dtype=vtype)
 I1 = np.resize(np.array([0, 1, 2, 0, 2, 3], dtype=np.uint32), (6 * (2 * 3)))
 I1 += np.repeat((4 * np.arange((2 * 3), dtype=np.uint32)), 6)
 I2 = np.resize(np.array([0, 1, 1, 2, 2, 3, 3, 0], dtype=np.uint32), (6 * (2 * 4)))
 I2 += np.repeat((4 * np.arange(6, dtype=np.uint32)), 8)
 return (V, I1, I2)

def cube ( ) : vtype = [ ( 'a_position' , np . float32 , 3 ) , ( 'a_normal' , np . float32 , 3 ) , ( 'a_color' , np . float32 , 4 ) ] v = [ [ 1 , 1 , 1 ] , [ ( - 1 ) , 1 , 1 ] , [ ( - 1 ) , ( - 1 ) , 1 ] , [ 1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 2 ] ) , ( v [ 4 ] , n [ 5 ] , c [ 4 ] ) , ( v [ 7 ] , n [ 5 ] , c [ 7 ] ) , ( v [ 6 ] , n [ 5 ] , c [ 6 ] ) , ( v [ 5 ] , n [ 5 ] , c [ 5 ] ) ] , dtype = vtype ) I1 = np . resize ( np . array ( [ 0 , 1 , 2 , 0 , 2 , 3 ] , dtype = np . uint32 ) , ( 6 * ( 2 * 3 ) ) ) I1 += np . repeat ( ( 4 * np . arange ( ( 2 * 3 ) , dtype = np . uint32 ) ) , 6 ) I2 = np . resize ( np . array ( [ 0 , 1 , 1 , 2 , 2 , 3 , 3 , 0 ] , dtype = np . uint32 ) , ( 6 * ( 2 * 4 ) ) ) I2 += np . repeat ( ( 4 * np . arange ( 6 , dtype = np . uint32 ) ) , 8 ) return ( V , I1 , I2 )
generates a cube-shaped structuring element .