def project_active_cells_proximal(tsframe, T02):
    points = np.empty([0, 3])
    for y in range(14):
        for x in range(6):
            if (tsframe[y, x] > 0.0):
                vertex = DH.get_xyz_proximal(x, y, T02)
                points = np.vstack((points, vertex))
    return points
def project_active_cells_proximal(tsframe, T02):
    points = np.empty([0,3])
    for y in range(14):
        for x in range(6):
            if(tsframe[y,x] > 0.0):
                vertex = DH.get_xyz_proximal(x, y, T02)
                points = np.vstack((points, vertex))
    return points       
def plot_cells_proximal(ax, tsframe, T02, scalarMap):
    span = 0.5
    for y in range(14):
        for x in range(6):
            vertex = np.empty([4,3])
            vertex[0,:] = DH.get_xyz_proximal(x-span, y+span, T02)
            vertex[1,:] = DH.get_xyz_proximal(x+span, y+span, T02)
            vertex[2,:] = DH.get_xyz_proximal(x+span, y-span, T02)
            vertex[3,:] = DH.get_xyz_proximal(x-span, y-span, T02)
            quad = Axes3d.art3d.Poly3DCollection([vertex])
            
            color = scalarMap.to_rgba(tsframe[y,x])            
                        
            if(tsframe[y,x] > 0.0):
                quad.set_color([color[0], color[1], color[2], 1.0]) # Active cell
            else:
                quad.set_color([0.0, 0.0, 0.0, 1.0])
                
            quad.set_edgecolor([0.3, 0.3, 0.3, 1.0])
            ax.add_collection3d(quad)
def plot_cells_proximal(ax, tsframe, T02, scalarMap):
    span = 0.5
    for y in range(14):
        for x in range(6):
            vertex = np.empty([4, 3])
            vertex[0, :] = DH.get_xyz_proximal(x - span, y + span, T02)
            vertex[1, :] = DH.get_xyz_proximal(x + span, y + span, T02)
            vertex[2, :] = DH.get_xyz_proximal(x + span, y - span, T02)
            vertex[3, :] = DH.get_xyz_proximal(x - span, y - span, T02)
            quad = Axes3d.art3d.Poly3DCollection([vertex])

            color = scalarMap.to_rgba(tsframe[y, x])

            if (tsframe[y, x] > 0.0):
                quad.set_color([color[0], color[1], color[2],
                                1.0])  # Active cell
            else:
                quad.set_color([0.0, 0.0, 0.0, 1.0])

            quad.set_edgecolor([0.3, 0.3, 0.3, 1.0])
            ax.add_collection3d(quad)