Menu

Tree [d1bbd3] master v0.2 /
 History

HTTPS access


File Date Author Commit
 examples 2009-10-04 Felipe Contreras Felipe Contreras [15857c] Add example for linux kernel
 util 2009-10-04 Felipe Contreras Felipe Contreras [08b1eb] convert-git: sort events
 README 2009-10-04 Felipe Contreras Felipe Contreras [d1bbd3] Rename to 'ripary'
 app.rb 2008-11-16 Felipe Contreras Felipe Contreras [1a7690] Move config stuff to a separate file.
 config.rb 2009-10-04 Felipe Contreras Felipe Contreras [d1bbd3] Rename to 'ripary'
 events.rb 2008-11-15 Felipe Contreras Felipe Contreras [b2fc9b] Some cleanups, and tuning.
 model.rb 2008-11-16 Felipe Contreras Felipe Contreras [1a7690] Move config stuff to a separate file.
 scene.rb 2009-10-04 Felipe Contreras Felipe Contreras [b1d20d] scene: increase size of the date
 vector.rb 2008-11-15 Felipe Contreras Felipe Contreras [1d9635] Reorganize into different files.

Read Me

ripary is a rewrite of Michael Ogawa's code_swarm in ruby using cairo.

Why? code_swarm is 5k lines of code it depends on java 'Processing', and it's
slow generating videos. Ripary is 500 lines of code, uses cairo, and it outputs
raw video.

For the original code:
http://code.google.com/p/codeswarm

The format of the events xml file is compatible with code_swarm's one.

You'll need libxml-ruby and cairo ruby files. You can use gem to install the dependencies:
 sudo gem install libxml-ruby
 sudo gem install cairo

== get the events file ==

There's a tool that generates the events file from a git repository:

./util/convert-git ~/src/my-project > events.xml

Most probably you would have to edit the file to remove mistakes.

== howto generate a video ==

This describes how to generate an MPEG-4 video clip using FFmpeg, but it's also
possible to export singe png images.

First create a fifo file:
 mkfifo /tmp/ripary_rgb.bin

Then on a console launch ffmpeg:
 ffmpeg -f rawvideo -pix_fmt bgr32 -s 640x480 -r 60 -qscale 11 -i /tmp/ripary_rgb.bin /tmp/movie.avi

It will wait until there's data on the fifo file.

Then launch ripary:
 ruby app.rb

That's it!

== to do ==

 * improve physics algorithms to be faster
 * don't depend on libxml (is there something fast enough)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.