A very technical post

Why a technical post? Well, to be honest because I realised how much we depend on a cloud-service. Let me explain how this happened and then provide a solution.

In the past, the AnRep3D-generator created graphs in the independent language VRML, used for 3D models. VRML is a formally obsolete language, able to present 2D and 3D models. I wrote “formally” because it has a successor called X3D. Yet VRML is still around and X3D as a pure language never became very well known let alone broadly accepted. Since AnRep3D-graphs are 3D models choosing VRML made sense in 2006, but there was also a disadvantage which became more important over the years. VRML can only be read by specific viewers or in a web-browser if a plug-in is installed. The number of viewers available over the year declined and on top of this, a kind of crusade against browser plug-ins started. People neither wanted to install a plug-in, nor did they download a viewer. In the end this meant nobody was looking at the AnRep3D-graphs (and VRBI for that matter). Switching to X3D wouldn’t have solved the issue as it needs a viewer as well and hardly any browser plug-ins are available.

In 2016 we knew we had to work on an alternative, to keep AnRep3D alive. To be able to show 3D models in a browser, HTML5 is the best standard now. Yet HTML5 heavily relies on JavaScript. I don’t like JavaScript at all, but it’s more or less the standard in dynamic webpages and it looked like we had no choice.

Luckily, Germany has always been very active in Virtual Reality and related subjects like VRML. Of course, the research-groups there encountered the same problems as AnRep3D did and the Fraunhofer Institute for Computer Graphics Research (IGD) created a very smart solution. It offers a cloud-service called X3DOM, able to convert a file with an X3D-like content into a Javascript programme in realtime. This means when our “3D-graphs” (actually an .htm-file with a lot of X3D-code in it) are being viewed, in the background the X3DOM cloudservice is called to translate the code upfront.

When you look at the output-file of the AnRep3D-generator (use our free demo package to create one or simply pick an example availabe in this demo-package) you will see something like this:

AB Inbev SAB Miller AnRep3D output file

The second part within the blue box is the actual graph, more or less in X3D. With some alterations it would be possible to generate pure X3D, to be read by a viewer. The first part however, surrounded by a red line, calls for a translation and as the file already is in the html-format, the translated result can be understood by the browser.

This works so well that I never thought about it, until last May (2018). The X3DOM cloud-service was down during a couple of days for the first time ever and as a result the AnRep3D-graphs didn’t work! I was shocked, especially because I never realised I was using a cloud-service translating the AnRep3D code in real-time! After the weekend https://x3dom.org  was up and running again, but I started to think about the options. It was then that I decided to write this post, to warn for the dependency.

It turned out the converted code can be saved locally to become independent from the cloud-service, but to be honest: I never did until last week. By right-clicking outside the blue part of the page, the source can be downloaded. I saved the example shown abobe. The result looks a little bit different from the original.

AB Inbev SAB Miller AnRep3D X3DOM output file

Apart from this, a folder has been added: AB-Inbev-SAB-Miller_files holding two files: x3dom.css and x3dom.js  The former is a cascading style sheet and the latter holds JavaScript-code. File and folder (with two additional files) together provide the local graph, No need for a connection to the Internet and X3DOM.org. The only difference I noticed is the page being larger. At first, only a blue background was visible, but scrolling down the graph is still there.

Of course we will work on the improvement of the generator and listen to our clients (companies holding a licence for the full generator, that is) to determine our roadmap.

Then a short note on JavaScript:

Despite “Java” being in the name, it has nothing to do with the Java programming language. It’s an example of “mimicry” used as a marketing strategy.

The AnRep3D-generator was written in Java, but any other language would have done. All one needs is the programme – never mind how it was created. The only issue is, the Java-package should be available on your device to be able to run it. Java is available for free at a separate Oracle-website: https://java.com/en/download/ Languages used by Microsoft are preinstalled in Windows, but Java is not.

Advertisements

About AnRep3D

AnRep3D is the new company, founded after the handover of Scientassist (together with VRBI) to one of my sons. From now I will focus on three-dimensional graphs for the financial markets, showing the main figures from annual reports in comparison.
This entry was posted in Visualising Financial Information and tagged , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.