How can I iterate over all possible vectors of d
dimensions with specified length (e.g. unit length), where delta
is the step-size.
Note that delta
can by quite small, such as 1e-3
for a unit vector. d
is commonly in the range of [0,5]
but this is not a hard restriction!.
The dumb approach would be to use a list of delta*i
for i in [0,N)
and generate all possible combos like in n choose n and select those which sum up to 1
. But this seems to be quite inefficient and I am sure there are better approaches which I am not aware of.
The picks should be at least close to uniformly distributed over the surface.