Interestingly, Wolfram still supports webMathematica. I was even able to run the Polyhedron Explorer example, which uses LiveGraphics3D 1.92.
Also, I had a look at the Wolfram Demonstrations Project. I like to think that LiveGraphics3D had an influence on the concepts behind this. However, when I tried some demonstrations, it wasn’t a very smooth experience: the frame rate of most of them was below 10 frames per second, the Wolfram CDF plugin wasn’t recognized at first, sliders didn’t work well in the external CDF player, and my Mac rebooted. Having the full power of Mathematica to drive interactive demonstrations is a great advantage, but if the overall experience is so unpleasing as it was for me then it’s not much fun. And with less and less browser support for NPAPI, I’m afraid that the experience for most users won’t become any better.
Apparently, Wolfram is now recommending Wolfram Cloud. That appears to solve some of the problems; however, latency (and therefore real-time interaction) is still a problem. Also, running computations in the cloud costs a lot more resources (i.e., money) than just hosting CDF files or notebooks.
The next thing appears to be Wolfram One. I’m not sure what it is. Maybe Wolfram Cloud with the Wolfram Desktop option for individuals?
Anyway, I’m not sure whether Wolfram is currently offering a good solution for deploying real-time interactive graphics on the web. Maybe the bottom line is that offering the full power of Mathematica for real-time interactive graphics on the web is just not a good idea, and web apps with limited computational power are still useful.
Of course, the evolution of Mathematica’s graphics is an example: LiveGraphics3D supports only Graphics3D objects of Mathematica before version 6 (when the graphics were significantly revised) because I’ve never found the time to support the version 6 graphics of Mathematica. (Part of the reason is that the scanning of textual representations of these graphics requires a lot more look-ahead than the older graphics.) Thus, in the long run, LiveGraphics3D is doomed because it cannot keep up with the evolution of Mathematica (unless someone else picks up the task).
Also, I started thinking about interacting with parametrized graphics in virtual reality. But I guess I shouldn’t get ahead of myself.
… is that it doesn’t matter where you start because so much has to be done. So where to start with porting the applet?
It’s actually easier to decide where not to start: the class TextElement is for formatted text, which is secondary; the classes Expression, ExpressionElement, and Evaluator are for evaluating symbolic expressions, which is not essential for the basic functionality. Quaternion and Primitive are small classes that I can do whenever they are needed.
This leaves the main class Live, the Graphics3D class for representing and rendering the Graphics3D object, and the Parser class for parsing the textual representation of a Graphics3D object. Among those the choice is relatively easy: Parser can work without the other classes, but Live and Graphics3D cannot be tested easily without Parser. Thus, Parser it is.
LittleBell is the sweetest user on Rec Room. Just had to say that. Also, her name rhymes with WebGL.
The alternative to WebGL is to use the 2D context of the HTML5 canvas element. I have some experience with that from my wikibook “Canvas 2D Web Apps;” thus, I’m much more confident that a port from Java to the canvas 2D API is manageable. You might wonder why I even consider the canvas 2D API for 3D graphics. The answer is simple: the Java applet faced the same challenges and I already made my peace with all the compromises that this implies. This port will probably not improve anything with respect to faster rendering or better render quality, but hopefully the porting of the code from Java to the canvas 2D API will be straightforward. At least that’s what I hope currently.
Why do we decide to do crazy things? Often it’s because of other people. In this case, it was Maurice Starck who put me on this path. (Thanks for that! I’ll remember your invitation to New Caledonia when this project is done.)
This project is about porting the Java LiveGraphics3D applet to a HTML5 web app. I’m not sure yet, what that means, but that’s part of the journey, I guess.