Thanks to Emanuele Feronato for providing a pure javascript solution, which was much easier for me to understand and convert for Unity. I still had issues with array "slicing" errors, but this approach was simple enough that I was able to work around the problems.

I replaced the java draw functions with Unity GUI DrawTexture methods and it works great for previewing. Now I want to figure out how to get a 3D object from the results...

Most likely generating a mesh, or possibly instantiate prefab cubes at the correct data points.