I wanted to know how to construct the set of amplitudes/phase for QAM modulation. I saw that a QAM signal can be represented as: $$ s_m(t)=A_{mi}g(t)\cos(2\pi f_c t)-A_{mq}g(t)\sin(2\pi f_c t) $$ where $A_{mi}$ and $A_{mq}$are two amplitude levels and $g(t)$ is the pulse. The resultant amplitude is given by: $$ A_{ra}=\sqrt{A_{mi}^2+A_{mq}^2} $$
And the resultant phase is given by: $$ \theta_m=\arctan\left(\frac{A_{mi}}{A_{mq}}\right) $$
Given the above, what values should I take for the amplitude levels so that I will get the resultant amplitude and phase?
I tried generating the amplitude and phase values for simple 4 QAM by taking 2 different amplitude levels and 2 different phase levels like below: $$A_{mi}=\left\{-1, 1\right\}, \quad A_{mq}=\left\{-1, 1\right\}$$
Then plotted the 4 possibilities (which seems pretty overlapping): Its clear that I need to take different amplitude levels for inphase and quadrature carriers. But is there any generalized formula for $A_{mi}$ and $A_{mq}$ so that I can generate my resultant amplitude and phase for QAM?
$$ \begin{array}{|c|c|c|c|} \hline A_{mi} & A_{mq} & A_{ra} & \theta_m\\\hline -1 & -1 & \sqrt 2 & \frac \pi4\\\hline -1 & 1 & \sqrt 2 & -\frac \pi4\\\hline 1 & -1 & \sqrt 2 & -\frac \pi4\\\hline 1 & 1 & \sqrt 2 & \frac \pi4\\\hline \end{array} $$