The JavaScript program below generates a random network of nodes distributed across the surface of a sphere, connects them together with links, and then renders them as an image. To see the source code, visit The A, D, S, and W keys can be used to rotate the view.

My initial intention was to use this as a starting point to build and render a system of "stargates" or "jump points" in a space-themed science fiction game. For example, look into the old DOS game Ascendancy.

As it stands, the program could probably stand some enhancement. Among other things, right now I'm not sure the nodes are being distributed and/or connected in the most efficient and/or aesthetically pleasing manner.