F### yeh! i still got it baby!
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

F### yeh! i still got it baby!

lukeh put out an elegant F# mandelbrot program, that gives this output to the console:

                                        #

####
####
# ##########
#################
###################
#####################
####### ######################
######### ######################
#############################################
######### ######################
####### ######################
#####################
###################
#################
# ##########
####
####

#

i tinkered with it, just to see if i could understand how it was working...

I turned the output into this:

000000000000001111111111111111111111111111111111111111111111111111
000000000000111111111111111111111111111111111111111111111111111111
000000000011111111111111122222222222111111111111111111111111111111
000000001111111111222222222222222222222222211111111111111111111111
000000011111112222222222222222333334974433322221111111111111111111
000000111112222222222222222333333445698994333322221111111111111111
000001112222222222222222333333344457899975443333222221111111111111
000011222222222222222233333334455679 97544443322222211111111111
000112222222222222233333344567777899 99875559433222221111111111
001122222222222223333444455699 99 99999943222222111111111
001222222222223344444445557999 9654322222211111111
0122222223334469666666666799 9894332222221111111
022233333344456999999998899 975332222222111111
02333333444456799 99 964333222222111111
0333335555679999 9 754333222222111111
0 97654333222222111111
0333335555679999 9 754333222222111111
02333333444456799 99 964333222222111111
022233333344456999999998899 975332222222111111
0122222223334469666666666799 9894332222221111111
001222222222223344444445557999 9654322222211111111
001122222222222223333444455699 99 99999943222222111111111
000112222222222222233333344567777899 99875559433222221111111111
000011222222222222222233333334455679 97544443322222211111111111
000001112222222222222222333333344457899975443333222221111111111111
000000111112222222222222222333333445698994333322221111111111111111
000000011111112222222222222222333334974433322221111111111111111111
000000001111111111222222222222222222222222211111111111111111111111
000000000011111111111111122222222222111111111111111111111111111111
000000000000111111111111111111111111111111111111111111111111111111
000000000000001111111111111111111111111111111111111111111111111111
000000000000000011111111111111111111111111111111111111111111111100

I think i'm getting the hang of it!

I love learning by doing... you change a little bit and then you run it again... then you tweak something else and you see what happens...

Here's my minor variation on luke's code Only difference:

i noticed he was saying "a * a" in one place, which is very cumbersome and repetitive [ ;-) ] -- so i implemented a custom 'squared' operator in there, using this name for the operator: '!!!!!@**'

Now instead of getting sore wrists typing out something as long winded and error prone as "a * a", i could simply say ( !!!!!@** a ) and F# would treat this as a * a.

Also, i reversed the 'colours', showing how many iterations it takes the function to 'escape' the inner circle from a given point. (i did know some maths stuff once upon a time y'know).

(I wrote a 'min' function in there too. i know there'd be one implemented already, but i'm trying to do simple tinkering here ;-) )

Your mission!

Next step: do the same thing rendering pixels to a bitmap instead... then i could try breaking that up amongst multiple cores... no... sleep time.

The interested reader is invited to finish this problem for me ;-)

Also -- here it is side on!

00000000000000000000000000000000000000000000000000000000
00000000000000111222223334943332222211100000000000000000
00000000011112222222333336963333322222221111000000000000
00000111112222222223333356965333332222222221111100000000
00011111222222222223334456965443332222222222211111000000
11111112222222222233444567 76544433222222222221111111000
11111222222222222344445999 99954444322222222222211111110
1111222222222222346666799   9976666432222222222221111111
11122222222222234568999       99986543222222222222111111
1122222222222334446799         9976444332222222222211111
112222222222333444699           996444333222222222211111
1222222222333344456799         9976544433332222222221111
12222222333334455667899       99876655443333322222221111
2222222333334555799 9           9 9975554333332222222111
222223333334699999                 999996433333322222111
22223333344579                         97544333332222111
222233344456799                       997654443332222111
2223344459789                           9879544433222111
1223976789   9                         9   9876793221111
122345899    9                         9    998543221111
11233496799999                         99999769433211111
11223334445689                         98654443332211111
111223333445579                       975544333322111111
111122233344579  9        9        9  975443332221111111
1111122223334698668 9999766679999 8668964333222211111111
11111112222233344444544444444444544444333222221111111111
11111111222222222333333333333333333322222222211111111111
11111111112222222222222222222222222222222221111111111111
11111111111112222222222222222222222222221111111111111111
11111111111111111222222222222222222211111111111111111111




'Josh' on Sat, 22 Dec 2007 04:40:49 GMT, sez:

Ok, so I accepted your challenge, but after I was finished I realized there was no good way to get the information to you. So... I created a "temporary" blog for the sole purpose of getting you the goods of the program. Anyway, I hope you enjoy.

p.s. The website link included is a direct link to said posting.




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Who reads this legal bit anyhow?

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

TimeSnapper won last year's Developer Competition at Larkware.com, and is used by over 10,000 people.

Articles

SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit
Movie: Priest Academy Movie: Priest Academy
Inspirational Rat Story Inspirational Rat Story
A face-melting DSL that allows programming ON the iPhone (and iPad) A face-melting DSL that allows programming ON the iPhone (and iPad)
The secretGeek Disaster Recovery plan The secretGeek Disaster Recovery plan
Save KNVTn! Before it's too late Save KNVTn! Before it's too late
The Ultimate Agent of WERF Destruction The Ultimate Agent of WERF Destruction
The new prisoner's dilemma The new prisoner's dilemma
Original Premise for a road movie Original Premise for a road movie
What's a better game than Devshop? What's a better game than Devshop?
DevShop: The Cool Game that Makes Development Look Fun DevShop: The Cool Game that Makes Development Look Fun
Should be purple Should be purple
Kitchen Agile Kitchen Agile
Perhaps Perhaps "Go" is the new Visual Basic
zen-coding: turn those CSS selectors upside down zen-coding: turn those CSS selectors upside down
Debugging: It's all about finding Albuquerque. Debugging: It's all about finding Albuquerque.
The Real-Time online JQuery Editor The Real-Time online JQuery Editor
HTML5, a 3 minute guide HTML5, a 3 minute guide
Developer Codpieces Developer Codpieces
Agile for one: The Personal Story 'Wall' In Action Agile for one: The Personal Story 'Wall' In Action
Never work with thick people. Never work with thick people.
Cosmo: project status panel Cosmo: project status panel
Windows Search in Japan Windows Search in Japan
Project Management Zen Project Management Zen
Continuous Integration, Plugins and Going Too Far Continuous Integration, Plugins and Going Too Far
The Rules of Stand Up The Rules of Stand Up
Sydney International Airport: Stupid, Criminal, or Criminally Stupid? Sydney International Airport: Stupid, Criminal, or Criminally Stupid?
God No! ...The ReBuilder God No! ...The ReBuilder
Matt, The Office Mortar Matt, The Office Mortar
'Outlook style' rules for Subversion 'Outlook style' rules for Subversion
Really deep linking: Url + regex Really deep linking: Url + regex
hExcel -- A Hexagonal Spreadsheet hExcel -- A Hexagonal Spreadsheet
Is the remote control a thing of the past? Is the remote control a thing of the past?
The Utterly Thorough Guide To Awesome Application Compatibility on Windows 7. The Utterly Thorough Guide To Awesome Application Compatibility on Windows 7.
Astounding Hyperlinked Noticeboard Astounding Hyperlinked Noticeboard
Three Questions About Each Bug You Find Three Questions About Each Bug You Find
Recursing over the Pareto Principle... Recursing over the Pareto Principle...
Sometimes, The Better You Program, The Worse You Communicate. Sometimes, The Better You Program, The Worse You Communicate.

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

World's Simplest Code Generator (html edition) World's Simplest Code Generator

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading

The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Reginald Braithwaite
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink
Joel Spolsky
Des Traynor

Aggregated Links

programming.reddit.com
dzone
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
n links today
new and notable
morning coffee
learning .net
weekly link post
(my del.icio.us account)

LinkedIn profile
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy