import math


def get_phase_law(N, d, wavelength, phi):
    """Computes a phase law given N (number of elements),
    d (spacing between elements in m), wavelength (in m)
    and phi (beam steering angle).
    """
    phase_law = [];
    for n in range(N):
        phase_law.append(-2 * math.pi * n * d / wavelength * math.sin(math.radians(phi)));
    return phase_law;