Posts Tagged ‘visualization’

Building Hamiltonian Graphs from LCF Notation


Updated November 14th, 2012

  • Uses Ember.js to handle UI events, the graph model, and fragment URLs
  • Improved performance to handle much larger graphs (draws a total of 50,000 vertices and edges before warning about performance)
  • Numbers in the LCF code are modifiable using arrow keys
  • Added random LCF code generation
  • Added freeze frame
  • Added gallery of graphs
  • Updated Bootstrap to handle larger graphs and support full screen display
  • Added vertex and edge count

I found this Wolfram MathWorld article on LCF notation after researching bilinear interpolation. The article inspired me to build a LCF notation parser that would create the graphs using d3.js. Originally, I only planned on displaying the circular graph without animation.  Adding the graph construction animation was definitely a wow milestone, but, after I enabled the forces on the links, it turned into a woah moment. The 3D structure of the graph actually reveals itself without having to build in any 3D calculations. This was a really fun project to build and it’s still exciting to watch it build a torus.

The The On-Line Encyclopedia of Integer Sequences is a good place to look for number series that result in interesting graphs.

Image of February 5th, 2012 Version

Chicago Train Visualization

The original rail system map image was found at the CTA's map page.

Runs best in a browser that has javascript acceleration (Firefox 3.5/Chrome). Trains are only added/removed at the beginning of the line.

I created this to test out some jQuery and javascript animation ideas I had. There is no
real practical use for it now. Think of it as a model railroad without the constant derailments.

Train Instructions

  • Hover: Pauses and Selects Train
  • Click: Reverses Selected Train
  • Double Click: Deletes Selected Train

Controls

  • Power:
  • Display:
  • Animation: (affects performance)
  • Speed

    Interval: 1000ms
    Processing Time: 0ms

  • Trains

    Max Trains: 25
    Current Trains: 25

Black Line

  • Requires at least two stops to have trains added
  • Click Map: Create Stop
  • ENTER: Show Marker Crosshair
  • w/a/s/d: Move Marker Crosshair
  • 1/2/3: Change Marker Crosshair Movement Scale
  • e: Output Marker Crosshair Coordinates