def METHOD_NAME(index, env, poses, linkLength):
    drawEnvironment(env)
    if index == -1:
        cMap = cm.ScalarMappable(
            norm=colors.Normalize(vmin=0, vmax=poses.shape[0] - 1),
            cmap=plt.get_cmap('viridis'))
        for (i, pose) in enumerate(poses):
            plt.gca().add_patch(getPositions(pose, linkLength, \
                cMap.to_rgba(i)))
    else:
        plt.gca().add_patch(getPositions(poses[index, :], linkLength))
        return ln,