(n)
return tex
Create a texture for the nodes. It may be simpler to just use an image!
    
    It returns a n*n*4 Numpy array with values in [0, 1]. The transparency
    channel should contain the shape of the node, where the other channels
    should encode the color.
Create a texture for the nodes. It may be simpler to just use an image!
    
    It returns a n*n*4 Numpy array with values in [0, 1]. The transparency
    channel should contain the shape of the node, where the other channels
    should encode the color.
Create a texture for the nodes . It may be simpler to just use an image! It returns a n * n * 4 Numpy array with values in [ 0 1 ] . The transparency channel should contain the shape of the node where the other channels should encode the color .
def get_tex(n):
    """Create a texture for the nodes. It may be simpler to just use an image!
    
    It returns a n*n*4 Numpy array with values in [0, 1]. The transparency
    channel should contain the shape of the node, where the other channels
    should encode the color.
    
    """
    tex = np.ones((n, n, 4))
    tex[:,:,0] = 1
    x = np.linspace(-1., 1., n)
    X, Y = np.meshgrid(x, x)
    R = X ** 2 + Y ** 2
    R = np.minimum(1, 3 * np.exp(-3*R))
    tex[:,:,-1] = R
    return tex
def get_tex ( n ) : tex = np . ones ( ( n , n , 4 ) ) tex [ : , : , 0 ] = 1 x = np . linspace ( - 1. , 1. , n ) X , Y = np . meshgrid ( x , x ) R = X ** 2 + Y ** 2 R = np . minimum ( 1 , 3 * np . exp ( - 3 * R ) ) tex [ : , : , - 1 ] = R return tex