Basically, given an initial distribution of (macro)particle positions in 3D (discretising cosmic mass), and an initial "displacement field" their further evolution can be well approximated by
x(t) = x0 - D*s(t)
where
q=initial position
D=displacement field
s(t) = growth factor (depending on cosmology)