Subscribe to DSC Newsletter

From chaos to clusters: origin and formation of galaxy clusters, mega cities, species, religions and everything that start as fuzzy clouds and end up in clusters. Based on mathematical modeling. Red dots represent new points, as initial points "die" and "birth" occur over time - faster at the beginning.

Done with Perl (for mathematical modeling), R (to produce 200 scatter plots) and Adobe (to assemble the scatter plots into a video). Each scatter plot has 500 dots, and required the computations of 125,000 distances, as points get attracted to neighbors. We'll publish details shortly, including source code. May converge or not depending on initial parameters and distance function. If convergence, can converge to very complex structure, a few big clusters (maybe like in this video - although the clusters change all the time), one single point (especially if edge effects are ignored), or a bunch of small clusters and super-clusters. In some cases, the evolving structure consist of small aligned clusters - it looks like a complex network of twisting filaments.

Source code: 123 lines of Perl, 10 lines of R. It takes just a few minutes to run the Perl script, the R program and playing with Adobe, to produce the video. This is indeed "small data", and I hope to do something bigger - much more points, much more scatter plots (embedded in the video), more colors, maybe 3D.


Views: 950

Comment by Vincent Granville on April 22, 2013 at 11:06am

The Youtube version is of better quality. Next time I'll produce a rectangular, rather than square frames. Video players seem to not like squares. And click here to download / view a 2MB wvm version produced with Active Presenter screen-cast software (free edition), as follows:

  1. I let the 200 plots automatically show up in fast motion in the R Graphics window (here's the R code, and the original 4MB dataset is available here as a text file)
  2. I selected with Active Presenter the area I wanted to capture (a portion of the R Graphic window, just like for a screenshot, except that here it captures streaming content rather than a static image)
  3. I clicked on Stop when finished and exported to wmv format, and uploaded on a web server for you to access it

Enjoy, and hopefully you can replicate my steps! It did not cost me any money. By the way, which version do you like best:

  1. The one posted on this page?
  2. The one on you tube?
  3. The one produced with Active Presenter?

Of course, I'm going to play more with these tools, and see how to produce better videos - including via optimizing my Perl script to produce slow-moving, rectangular frames. Stay tuned!

Comment by Yu Song on May 6, 2013 at 9:05am

Thanks for this thread! The youtube one is prefered. I tried with gif converter with the output. I am wondering if there's video package in R. 

I am interested in the algorism/math modeling assumptions.

I would love to see the Perl code.




You need to be a member of AnalyticBridge to add comments!

Join AnalyticBridge

Follow Us

On Data Science Central

On DataViz

On Hadoop

© 2018 is a subsidiary and dedicated channel of Data Science Central LLC   Powered by

Badges  |  Report an Issue  |  Terms of Service