I found this image and I would like to replicate the effect algorithmically. How would one describe this distortion effect mathematically? The rate of change of scale seems very familiar, and the non-straight edges implies more than just a scaling effect. Sorry for the rather naive question...

The point of view is at the origin. The nodes seen are at 3-D points with integer coordinates, and say, with $x > 1$ so that you are not worrying about the point you are sitting on. And you are looking at a projection, say onto the plane $x=\rho$; for example, $\rho = 1/2$ places the plane right in front of your eyes.
For each point, you transform that point into spherical coordinates via $$ \begin{array}{c} r = \sqrt{x^2+y^2+z^2} \\ \phi = \tan^{-1} \frac{y}{x} \\ \theta = \sin^{-1} \frac{z}{r} \end{array} $$
Now you project the line of that $(\phi, \theta)$ and parameterized by $r$ varying, onto the plane at $x=1/2$. That is, you solve $$ r \cos \theta \cos \phi = \rho$$ and you plug in that $r$ to find the $(y,z)$ of where to draw the point; $x$ is ignored.
For example, if $\rho = 1/2$ the grid point $(12,3,4)$ whould have $$ \begin{array}{c} r = 13 \\ \phi = \tan^{-1} \frac{3}{13} \\ \theta = \sin^{-1} \frac{4}{13} \end{array} $$ $$ \cos \theta \cos \phi \approx 0.923 $$ $$ r_{x=1/2} = \frac{1/2}{\cos \theta \cos \phi } \approx 0.542\\ $$ So at that projection plane, $$ \begin{array}{c} y_{x=1/2} = r_{x=1/2} \cos \theta \sin \phi = 0.125\\ y_{x=1/2} = r_{x=1/2} \cos \theta \sin \phi = 0.125\\ r_{x=1/2} \sin \theta = 0.167 \end{array} $$ so you would draw that point at $(\frac{1}{8},\frac{1}{6})$ in your picture (the example was chosen such that the numbers worked out nicely). $$
It's a lot easier to code this up than to do it by hand, and modern GPU's are good at doing it for many millions of points every second to render drawings such as this one.