Hey Lefteris.

There are methods for simulating general distributions. You should look at MCMC methods like Metropolis Hastings and Gibbs Sampler:

Metropolis?Hastings algorithm - Wikipedia, the free encyclopedia

Gibbs sampling - Wikipedia, the free encyclopedia

You should also look at the basic theorem that underlies non MCMC generation:

Inverse transform sampling - Wikipedia, the free encyclopedia