A function which yields such random numbers for the normal distribution would include statements like
..... idum=-1; radius=sqrt(-2*ln(1.-ran0(idum))); theta=2*pi*ran0(idum); x=radius*cos(theta); y=radius*sin(theta); .....