Installing RMagick on Ubuntu*
Posted by Ryan Baxter Thu, 20 Aug 2009 17:00:00 GMT
Because I always forget how…
sudo apt-get install libmagickwand-dev
sudo gem install rmagickand you reference it in code like so:
# Don't forget the capital "RM"!
require 'RMagick'
include RMagick*I’ve only done this using Ubuntu 9.04. Your mileage may vary.
- Posted in Code Snippets
- Meta no comments, permalink, rss, atom
Where is _why?
Posted by Ryan Baxter Thu, 20 Aug 2009 13:20:00 GMT
Why the lucky stiff speaking at the Carnegie Mellon Art and Code Symposium. If the rumors are true, you’ll be missed.
ART && CODE Symposium: Hackety Hack, why the lucky stiff from STUDIO for Creative Inquiry on Vimeo.
- Posted in Expect the Unexpected
- Meta no comments, permalink, rss, atom
A Couple New Fractals
Posted by Ryan Baxter Mon, 12 Jan 2009 20:46:00 GMT
I’ve created types for both the Burning Ship and Newton fractals and added them to trunk of the Ruby Fractal Library repository. The Newton fractal was a little tricky since its formula requires the derivative of a polynomial p(z). A private “derivative” method yields the results of the expression, (f(x + dx) - f(x)) / dx when dx is provided as a parameter and p(z) is passed to the block.
private
def derivative(dx)
lambda { |x|
(yield(x + dx) - yield(x)) / dx
}
end Before making an official release, I’m going to do a few creative things with blocks and add one or two new coloring algorithms.
After the release, I’d like to begin experimenting with iterated functions and random fractals in hopes of making the library more well rounded. I’m also thinking about abstracting the rendering logic in an attempt to make RMagick less of a dependency. We’ll see how that goes.
The following code was used to render the fractals seen here:
burningShip = BurningShip.new(Complex(-1.75, -0.04))
burningShip.magnification = 32
burningShip.save_as('burning_ship.png')
newton = Newton.new
newton.a = -0.5
newton.pz = lambda { |z| z**3 - 1 }
newton.theme = Themes::Winter
newton.save_as('newton.png')Once that is all said and done I’ll be taking a break from fractals to work on another pet project. I’ll post more on that when I have something to show. Cheers.
- Posted in Code Snippets
- Meta no comments, permalink, rss, atom

