Après N pas de longueur d, l'expression générique des coordonnées est :

x = \sum_{i=1}^{N}d\;cos \phi_{i} \; sin  \theta_{i}

y = \sum_{i=1}^{N}d\;sin \phi_{i} \; sin  \theta_{i}

z = \sum_{i=1}^{N}d\;cos \theta_{i}

La distance au point de départ est :

r^2 = x^2+ y^2 + z^2 = d^2 \biggl[(\sum_{i=1}^{N}cos \phi_{i} \; sin \theta_{i})^2+ (\sum_{i=1}^{N}sin \phi_{i} \; sin \theta_{i})^2 + (\sum_{i=1}^{N} \; cos \theta_{i})^2) \biggl]