Archive for May, 2008
c# Mandelbrot fractal unleashed!
by brian on May.15, 2008, under .NET, c#, coding, graphics
I remember the first time I saw the Mandelbrot set. It was incredible! After I had successfully programmed at it on my 8088 (a very old DOS computer). I would wait 10 minutes at a time for a screen to pop up. The detail was nothing short of amazing. The swirls, the shapes, the colors. The neatest thing was the ability to zoom into it to reveal more and more and more detail.
Well it’s been many years and computers have improved a great deal as have the tools to program them. So I wrote another Mandelbrot explorer.
What is the Mandelbrot set? Well…. In short it is Xn+1 = Xn2 + C iterated until the magnitude of Xn is greater than 4 or the maximum number of iterations is met then the number of iterations is used as the color of the pixel. Xn is a complex number, C is another complex number where the x coordinate of the pixel defines the real part and the y coordinate defines the imaginary part of the number. The magnitude is defined as X2 + Absolute Value of (Xi2). Then this process is repeated for each pixel. Holy smoke that is a mouthful!
Anyway take a peek at the code if you’d like and surely get the app and have fun exploring the Mandelbrot set.
To zoom in a spot just click on it. The number is the number of iterations. The more iterations the deeper the pattern goes (well until you run into percision problems).
Have fun!
A shift
by brian on May.09, 2008, under coding, life
The last couple of weeks have been a real shift for me. After finishing up a contract I have spend most of my time in a different lanuage, and entirely different programming environment. I’ve switched from Windows and c# to Linux and Ruby. From normal applications to web applications.
One of the things I like most about switches is all the new stuff I learn. Currently I’m working on building sweetcarloan.com this has been very educational. I’ve learned a great deal about SEO (search engine optimization) and though the concepts are fairly easy to understand it’s incredible time consuming and difficult. I have new respect for those that do it for a living.
It’s been fun to dive back into Ruby a language that has some similarities to c# but some huge differences. It’s got good support for lambda statements, reflection, extensions methods, inline funtion definitions (hmm had remember the names off hand.) However there are some huge differences in syntax and Ruby is completely dynamic in typing.
So that’s this week it’s been a total shift.
