One can generalize for any dimension d>1 to generate number according to a law like
where k(T) is a normalization constant depending only on T. The corresponding algorithm will be