Relationship between switching pattern and the harmonics generated
Yes. The switching pattern is the essential factor that determines the amplitude and phase of the harmonic components. The switching pattern determines the waveform of the current and/or voltage produced. The fourier analysis of the waveform provides the amplitudes and phase of the harmonic components. Usually only the amplitude is of interest, so the fourier analysis is simplified to give only the amplitude, but both the amplitude and phase can be obtained. You should be able to find extensive information on fourier analysis. Here is a link a PDF textbook chapter that seems to have the relevant information: LINK

Note that switching pattern is not the only factor. In many situations, the switching pattern determines the voltage waveform, but the voltage waveform must be applied to a complex loop impedance to determine the current waveform.