Dex in Space

First Post for 2013

It’s going to be an awesome year.  I feel it.  I’m excited and my mind is buzzing with ideas.

Topic at Hand

Ever since I saw the amazing feats of Mr. doob with ThreeJS on top of WebGL, There is an entire thriving community in the GL techologies performing amazing feats with thousands of objects being rendered directly on the metal of the GPU.

However, I had a problem.  The JavaFX browser, based upon the WebKit, lacked WebGL integration, nor is it likely to be delivered anytime soon.

So I pondered workarounds ranging from using JNA to embed Chrome directly into my application to very extreme measures of ditching the Java platform entirely and developing straight in HTML5.

Luckily, I did not have to do either of these as there is a package called Selenium.  Selenium allows a Java application to control a browser such as Chrome, Firefox or Explorer remotely.

The integration is not as tight as I’d like, however, its good enough and gives me top notch WebGL engines to work with.  I am happy.  Hopefully WebGL will be fully integrated into the JavaFX stack in Java8 and I’ll be well positioned there.  Either way, WebGL is here to stay.

WebGL and Three.js

The author of Three.js is a brilliant programmer who goes by the handle Mr. doob.  Mr. Doob eats binary for lunch and GPU cycles for dinner.  His dreams are full of sins, cosines and irrational functions.

Where WebGL is highly mathematical, Three.js hides that complexity from the programmer (mostly).  So successfully armed with new WebGL capabilities, I started seeing what I could do.  SO I tackled the hello world of the charting world: Scatterplot.

Scatterplot #1

This scatterplot was generated from data based upon the concepts of the central limit theorem.  Each series generated a number of samples within some range, then averaged them together to plot a single point.  This produces clusters of values (all color coded) which can be fun to explore in 3D.

“Click on any of the images to see the live demo”

View with Chrome if possible.


Scatterplot #2

This dataset was generated randomly across the whole volume of the cube.


Scatterplot #3

Scatterplot #2 is simply degrees ranging from -360 to 360, transformed to radians then fed into various cosine and sin and arctan functions.  It’s fun to look at.


Where to from here?

I plan to produce a series of interactive three dimensional charting facilities.  I’ll likely deprecate the existing ones as they are quite primitive compared to what you can do in WebGL.

Look for this capability in the next point release.

– Pat


About patmartin

I am a coder and Data Visualization/Machine Learning enthusiast.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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