Need an algorithm for an outward spiral starting from the origin on a grid in $n$-dimensions.

119 Views Asked by At

Need an algorithm for an outward spiral starting from the origin on a grid in $n$-dimensions. I have the answer in 2-d, and looking to extend. Interest here is for "inverse CDF" sampling from an $n$-dimensional probability distribution.