# generate_n_vectors¶

gala.dynamics.generate_n_vectors(N_max, dx=1, dy=1, dz=1, half_lattice=True)[source]

Generate integer vectors, $$\boldsymbol{n}$$, with $$|\boldsymbol{n}| < N_{\rm max}$$.

If half_lattice=True, only return half of the three-dimensional lattice. If the set N = {(i,j,k)} defines the lattice, we restrict to the cases such that (k > 0), (k = 0, j > 0), and (k = 0, j = 0, i > 0).

Todo

Return shape should be (3,N) to be consistent.

Parameters
N_maxint

Maximum norm of the integer vector.

dxint

Step size in x direction. Set to 1 for odd and even terms, set to 2 for just even terms.

dyint

Step size in y direction. Set to 1 for odd and even terms, set to 2 for just even terms.

dzint

Step size in z direction. Set to 1 for odd and even terms, set to 2 for just even terms.

half_latticebool (optional)

Only return half of the 3D lattice.

Returns
vecsnumpy.ndarray

A 2D array of integers with $$|\boldsymbol{n}| < N_{\rm max}$$ with shape (N,3).