2007/04/08

Buffon's Needle Simulation through Ruby

I'm reading "Beautiful Evidence" written by Edward Tufte. His view point about information is very amusing. Because we are currently facing tons of informations that forms our decisions. Too much informations lead us to simple conclusions that we didn't intend("Paradox of choice" written by Barry Schwartz). So it's important to consume informations properly. In this context, "Beautiful Evidence" is crucial for us as far as I think. I've done some coding through Ruby to get PI. And visualized it by Gruff. This fundamental simulation is just beginning of my simualtion work. This ruby code isn't polished yet. But you can test Gruff. Thanks Geoffey!

Installing Gruff.
http://nubyonrails.com/pages/gruff


1. Install imagemagick.
Download file at
ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/linux/SRPMS/

2. Install RMagick
From
http://rubyforge.org/frs/?group_id=12
download rmagick-1.15.5.gem and then type
> gem install rmagick-1.15.5.gem --local

3. Install Gruff 설치
Just type
> gem install gruff
While installing it will ask you to install dependency files. Just say yes

> gem install sparklines

4.You need ariel font to use Gruff.
If you don't have it on your system, follow the specific steps from here.
http://tomcopeland.blogs.com/juniordeveloper/2006/02/charts_and_grap.html

1 comment:

  1. PSN Code Generator

    Also visit my web page :: Free PSN Cards

    ReplyDelete