Transformation between random variables If given realization of X and Y, which are i.i.d. Gaussian random variables.
We need to generate random variables C and D which are jointly Gaussian with zero mean and covariance matrix like
$
  \begin{bmatrix}
    2 & -1  \\
    -1 & 2 
  \end{bmatrix}$
using X and Y. How to provide a transformation that can be used to obtain C and D from X and Y?

If $x$ is a vector of i.i.d. Gaussian random variables, and $u=Ax+b$, then $u$ is Gaussian with mean $b$ and covariance matrix $AA^T$.
One way to decompose a given covariance matrix into such a product is the Cholesky decomposition, which msm used for his parametrization
$$
\begin{bmatrix}
    2 & -1  \\
    -1 & 2 
\end{bmatrix}
=
\begin{bmatrix}
    1 & 0  \\
    -\frac12 & 1 
\end{bmatrix}
\begin{bmatrix}
    2 &  0 \\
    0 & \frac32 
\end{bmatrix}
\begin{bmatrix}
    1 & -\frac12  \\
    0 & 1 
\end{bmatrix}
=
\begin{bmatrix}
    \sqrt{2} & 0  \\
    -\frac{\sqrt{2}}2 & \frac{\sqrt{6}}2 
\end{bmatrix}
\begin{bmatrix}
    \sqrt{2} &  -\frac{\sqrt{2}}2 \\
    0 & \frac{\sqrt{6}}2 
\end{bmatrix}
$$
