June's Fractal
Jul. 20th, 2008 | 09:41 pm
http://pauldoo.com/fractals/BifurcationD iagram.html
I quite like this one. It was simple to code and it's an idea that I tried only on a whim. It seems to have worked OK though. :)
I quite like this one. It was simple to code and it's an idea that I tried only on a whim. It seems to have worked OK though. :)
Link | Leave a comment | Add to Memories | Tell a Friend
May's Fractal
Jun. 22nd, 2008 | 02:29 pm
May's fractal is really really late, but here it is anyway:
http://pauldoo.com/fractals/NewtonRaphs on.html
For all the applets before May's I had picked fractals that I already knew something about and had implemented before (though perhaps without a UI). I wanted May to be different, and unfortunately my first attempt at a new (for me) fractal turned out to be a bit of a mess. I created some silly 4D fractal viewer with a way too complicated set of UI controls. It didn't make sense to anyone who used it.
I wasted a lot of time on that dead end, and just last week I decided to abandon it and try a different, simpler fractal. I picked Newton Raphson because it's one that I've never implemented before, but I knew that it should fit within the existing framework I had.
The Newton Raphson has worked out quite nicely. It worked very quickly, and I was able to spend a couple of days optimizing the thing to be fast.
The good:
The bad:
http://pauldoo.com/fractals/NewtonRaphs
For all the applets before May's I had picked fractals that I already knew something about and had implemented before (though perhaps without a UI). I wanted May to be different, and unfortunately my first attempt at a new (for me) fractal turned out to be a bit of a mess. I created some silly 4D fractal viewer with a way too complicated set of UI controls. It didn't make sense to anyone who used it.
I wasted a lot of time on that dead end, and just last week I decided to abandon it and try a different, simpler fractal. I picked Newton Raphson because it's one that I've never implemented before, but I knew that it should fit within the existing framework I had.
The Newton Raphson has worked out quite nicely. It worked very quickly, and I was able to spend a couple of days optimizing the thing to be fast.
The good:
- More colour.
- Reasonably fast on Java6 VMs.
- Reused a lot of code from earlier fractals.
The bad:
- Just the Mandelbrot fractal from before with a different iteration function.
- Slow on Java5 VMs (including Mac OS X).
- Don't have much time to make the June fractal.
Link | Leave a comment | Add to Memories | Tell a Friend
April's Fractal
May. 11th, 2008 | 09:36 pm
April's fractal is finally here:
http://pauldoo.com/fractals/DiffusionLi mitedAggregation.html
This one is clearly very late and I blame work for that. I had an international trip around my usual release time.
Good:
Bad:
http://pauldoo.com/fractals/DiffusionLi
This one is clearly very late and I blame work for that. I had an international trip around my usual release time.
Good:
- Colour!
- Simpler to use than last month's
- Fast
Bad:
- Late
- Still no 3D
- Surprising amount of code required
Link | Leave a comment | Add to Memories | Tell a Friend
March's Fractal
Apr. 4th, 2008 | 11:01 pm
March's fractal is here:
http://pauldoo.com/fractals/IteratedFunc tionSystem.html
Good:
Bad:
http://pauldoo.com/fractals/IteratedFunc
Good:
- One more day less late
- Nicely interactive
- Not just the obvious Julia / Mandelbrot thing
Bad:
- Still no colour
- Tricky to explain so have to use pictures
Link | Leave a comment | Add to Memories | Tell a Friend
February's Fractal
Mar. 5th, 2008 | 09:17 pm
mood:
rushed
February's Fractal is here, only a few days late:
http://pauldoo.com/fractals/JuliaSet.ht ml
The instructions are a bit scant, basically you drag the orange dot around to explore the Julia sets that are associated with each point on the Mandelbrot set. Click the big button to view the high-res version of the Julia set.
The Good:
The Bad:
http://pauldoo.com/fractals/JuliaSet.ht
The instructions are a bit scant, basically you drag the orange dot around to explore the Julia sets that are associated with each point on the Mandelbrot set. Click the big button to view the high-res version of the Julia set.
The Good:
- I copied the idea of dragging a control tool (the orange spot) from ChaoticDust.
- Less late that my January one...
The Bad:
- I created a real complex number class for hiding away some of the arithmetic, so the rendering is now slower than the January release.
- Dragging the orange dot can be quite laggy.
- My interactively updated julia sketch isn't as dense as other ones I've seen: http://en.wikipedia.org/wiki/Image:Rever
sed_Julia_set_C_%3D_%28_0.4_0.3_%29.gif - Still goes a bit nuts if you zoom too far.
- Caching in your browser may mean you don't see the correct newly updated applet. You will know this if you don't see an orange spot.
Link | Leave a comment {8} | Add to Memories | Tell a Friend
New year's resolution
Feb. 6th, 2008 | 08:32 pm
Last year I followed the progress of Petri Purho and his Kloonigames Blog where Petri attempted to churn out a simple game once a month. He managed to keep it up for a whole 12 months, and his First Season of games was quite impressive.
As a sort-of new year's resolution I've decided to attempt something similar myself. I like the idea of having regular monthly releases of small programs that when viewed together as a collection might be quite interesting.
So my topic..
Well I've always been interested in fractals, and I see that there is a gap on the web for some nice friendly interactive applets. The current ones on the web are a bit clunky, usually lacking intuitive navigation and requiring that you type in coordinates etc. The ones I create will hopefully be a bit more "google-map-y" in the way you interact.
I have also been impressed with Paul Bourke's Fractal pages for a long while. If I could slowly create something similar but with with small interactive versions, that'd be very cool.
My first applet happens to be late. I was hoping to post it at the end of January. I had the applet ready by then, but unfortunately I wasted about a week trying to get the thing embedded into my Wiki. Tonight I gave up and have decided to simply to place the applet on a static html page, and link to my Wiki instead.
So here it is: http://pauldoo.com/fractals/MandelbrotSe t.html
Be kind!
As a sort-of new year's resolution I've decided to attempt something similar myself. I like the idea of having regular monthly releases of small programs that when viewed together as a collection might be quite interesting.
So my topic..
Well I've always been interested in fractals, and I see that there is a gap on the web for some nice friendly interactive applets. The current ones on the web are a bit clunky, usually lacking intuitive navigation and requiring that you type in coordinates etc. The ones I create will hopefully be a bit more "google-map-y" in the way you interact.
I have also been impressed with Paul Bourke's Fractal pages for a long while. If I could slowly create something similar but with with small interactive versions, that'd be very cool.
My first applet happens to be late. I was hoping to post it at the end of January. I had the applet ready by then, but unfortunately I wasted about a week trying to get the thing embedded into my Wiki. Tonight I gave up and have decided to simply to place the applet on a static html page, and link to my Wiki instead.
So here it is: http://pauldoo.com/fractals/MandelbrotSe
Be kind!
Link | Leave a comment {2} | Add to Memories | Tell a Friend
Christmas update
Jan. 4th, 2008 | 08:54 pm
Hello chaps. My christmas and new year holidays are nearly over, and to be honest I'm looking forward to going back to work. Sarah is already back at work and even with christmas toys to play with it's still a bit boring on my own. I've spent a lot of time mucking about on Facebook and playing with the rats.
For christmas this year Sarah gave me a lovely classical guitar. I owned one when I was living in Colorado a few years ago, it's good fun having one again that I can play some simple tunes on. :D I wrote a guitar tuner yonks ago, and so it has been given a bit of a dust off recently.
I've put some christmas money towards ordering a new push bike (in the sale of course). It'll replace the one I've got that's very heavy, very rusty, and in need of several repairs that the repair shop tell me aren't worth the expense. The new one is a bit lighter and has fancy hub gears that should be easier to maintain. I'll be able to pick it up this Sunday or Monday, I'm quite excited.. :D
I'm going to a pantomime tomorrow with Dad and some of his friends. Should be good fun I reckon. Though it does mean I'll miss out on some bathroom shopping with Sarah. :/ I'm sure she won't pick anything too hideous. :p
For christmas this year Sarah gave me a lovely classical guitar. I owned one when I was living in Colorado a few years ago, it's good fun having one again that I can play some simple tunes on. :D I wrote a guitar tuner yonks ago, and so it has been given a bit of a dust off recently.
I've put some christmas money towards ordering a new push bike (in the sale of course). It'll replace the one I've got that's very heavy, very rusty, and in need of several repairs that the repair shop tell me aren't worth the expense. The new one is a bit lighter and has fancy hub gears that should be easier to maintain. I'll be able to pick it up this Sunday or Monday, I'm quite excited.. :D
I'm going to a pantomime tomorrow with Dad and some of his friends. Should be good fun I reckon. Though it does mean I'll miss out on some bathroom shopping with Sarah. :/ I'm sure she won't pick anything too hideous. :p
Link | Leave a comment | Add to Memories | Tell a Friend
Inheritance (the OOP kind)
Sep. 11th, 2007 | 08:31 pm
mood:
geeky
I've recently noticed that deciding class inheritance requires looking at the behaviour you want from your classes a lot more than I'd previously realised[1]. Looking at what they represent isn't enough. Looking at the classic Rectangle and Square example in OOP..
If we are interested in creating a couple of read-only and immutable classes (Get methods only), then everything we can ask of a Rectangle we can also ask of a Square (GetWidth() and GetHeight()). So leading from this we'd be inclined to make Square inherit from Rectangle.
Alternatively.. If we are interesting in write-only classes and we focus only on the Set methods then we come to the opposite conclusion. Having Rectangle as base would imply that Square would need to implement SetWidth() and SetHeight(), not very clever. Only SetSize() makes sense for both shapes, and so we conclude that Square should be the base, with Rectangle derived (presumably SetSize() on a rectangle would set both the width and height in one go).
Can this sort of issue (where looking at different behaviour requirements for the same set of objects could lead to different decisions about inheritance) crop up with real classes? Or is this an artifact of the slightly dodgy example[2]? I'm inclined to think it is a real problem, but I can't think of an instance in which this has bitten me for real.
Is there a name for this kind of analysis? Can any of the more experienced programmers out there suggest a good book?
Also.. What happens if you have an existing class hierarchy and are interested in adding a new feature, only to discover that the new feature would require a different inheritance layout? (Maybe we have read-only shape classes, and want to extend them to be mutable).
[1] Hmm, books always say that classes should focus on behaviour more than anything else.
[2] We probably shouldn't have a Square class, or at least it should be unrelated to Rectangle.
If we are interested in creating a couple of read-only and immutable classes (Get methods only), then everything we can ask of a Rectangle we can also ask of a Square (GetWidth() and GetHeight()). So leading from this we'd be inclined to make Square inherit from Rectangle.
Alternatively.. If we are interesting in write-only classes and we focus only on the Set methods then we come to the opposite conclusion. Having Rectangle as base would imply that Square would need to implement SetWidth() and SetHeight(), not very clever. Only SetSize() makes sense for both shapes, and so we conclude that Square should be the base, with Rectangle derived (presumably SetSize() on a rectangle would set both the width and height in one go).
Can this sort of issue (where looking at different behaviour requirements for the same set of objects could lead to different decisions about inheritance) crop up with real classes? Or is this an artifact of the slightly dodgy example[2]? I'm inclined to think it is a real problem, but I can't think of an instance in which this has bitten me for real.
Is there a name for this kind of analysis? Can any of the more experienced programmers out there suggest a good book?
Also.. What happens if you have an existing class hierarchy and are interested in adding a new feature, only to discover that the new feature would require a different inheritance layout? (Maybe we have read-only shape classes, and want to extend them to be mutable).
[1] Hmm, books always say that classes should focus on behaviour more than anything else.
[2] We probably shouldn't have a Square class, or at least it should be unrelated to Rectangle.
Link | Leave a comment {2} | Add to Memories | Tell a Friend
Combo Boxes
Aug. 6th, 2007 | 09:19 am
location: At work, still waiting on a build
Combo Boxes have strange behaviour when you type into them. I've got an example one here to illustrate.
It's a shame these two things conflict when the entry you want begins with a repeated letter.
In the example above, give the combo box focus and then try typing "e3", "24", "38" or any entry that is two different characters. It works great. Try typing again to jump to "44", "55", or "ee" (in an attempt to find "eek"), and you'll see the problem I'm talking about.
So here the UI is behaving differently for only subtly different input, and for the user this is just going to be confusing.
What's the solution? For me I can simply replace my combo boxes with spinners or plain text fields. I'm not sure what the workaround is if you need combo boxes...
- If you repeatedly press the same character into a combo box, it'll iterate through all of the options beginning with that character.
- If you type a word without pausing between the keystrokes, it'll jump straight to that word.
It's a shame these two things conflict when the entry you want begins with a repeated letter.
In the example above, give the combo box focus and then try typing "e3", "24", "38" or any entry that is two different characters. It works great. Try typing again to jump to "44", "55", or "ee" (in an attempt to find "eek"), and you'll see the problem I'm talking about.
So here the UI is behaving differently for only subtly different input, and for the user this is just going to be confusing.
What's the solution? For me I can simply replace my combo boxes with spinners or plain text fields. I'm not sure what the workaround is if you need combo boxes...
Link | Leave a comment {3} | Add to Memories | Tell a Friend
Oooh! Journal renamed...
Aug. 6th, 2007 | 09:12 am
location: At work, waiting on a build
Finally! That old crufty "pauldoo" journal I started when in 1st year uni and abandoned after ten minutes has expired. This "pdoo" one has been renamed to my preferred title. :)
Apparently all linky things from the old one should have been automagically updated to follow.
Apparently all linky things from the old one should have been automagically updated to follow.
Link | Leave a comment | Add to Memories | Tell a Friend
Looking for a flat way to cycle..
Jun. 15th, 2007 | 10:08 pm
Hi peeps.
The new flat, which is awesome btw, is a bit too far away from work for me to walk. So I'll be cycling on my now slightly rusty bike. It'll be good for me, it'll make me less of a pie.
Anyway, being lazy I'm trying to find the flattest route to cycle, this is the best I can come up with. Not too bad, but I bet I'm knackered after every trip for at least the first week.
Hope the weather improves.
The new flat, which is awesome btw, is a bit too far away from work for me to walk. So I'll be cycling on my now slightly rusty bike. It'll be good for me, it'll make me less of a pie.
Anyway, being lazy I'm trying to find the flattest route to cycle, this is the best I can come up with. Not too bad, but I bet I'm knackered after every trip for at least the first week.
Hope the weather improves.
Link | Leave a comment {3} | Add to Memories | Tell a Friend
Very important announcement!!
May. 6th, 2007 | 07:39 pm
Picked up a leaflet for the Taste of Edinburgh today. Looks awesome!
Who else fancies going? I don't mind booking a bunch of tickets together.
Who else fancies going? I don't mind booking a bunch of tickets together.
Link | Leave a comment {2} | Add to Memories | Tell a Friend
First post in 3 months
Apr. 11th, 2007 | 08:32 pm
I'll reach 4 a year if I keep up at this cracking pace! Awesome. :)
I have a new niece called Julie! \o/ Hurrah! Julie is Nigel & Klara's second childlet. :) I haven't seen her yet or heard much from the parents. No doubt they've crashed out while they recover.
The flathunting with Sarah has finally finished. We're going through all the survey and legal mumbo jumbo for a flat out in Duddingston. EH8 7TU if you want to look it up. We'll hopefully be moving in June so keep the time free in your diaries to perform heavy lifting & decorating. :)
My MacBook has just started showing a black X over the battery icon. It's refusing to charge or do anything when not plugged into AC. This is the same MacBook that had the logic board replaced only a couple of months after I bought it. Damn me for buying rev.A hardware. :/
I have a new niece called Julie! \o/ Hurrah! Julie is Nigel & Klara's second childlet. :) I haven't seen her yet or heard much from the parents. No doubt they've crashed out while they recover.
The flathunting with Sarah has finally finished. We're going through all the survey and legal mumbo jumbo for a flat out in Duddingston. EH8 7TU if you want to look it up. We'll hopefully be moving in June so keep the time free in your diaries to perform heavy lifting & decorating. :)
My MacBook has just started showing a black X over the battery icon. It's refusing to charge or do anything when not plugged into AC. This is the same MacBook that had the logic board replaced only a couple of months after I bought it. Damn me for buying rev.A hardware. :/
Link | Leave a comment | Add to Memories | Tell a Friend
Holidays are great
Jan. 7th, 2007 | 08:57 pm
mood: smug
I've got tomorrow off work! My heart goes out to everyone who hasn't.. :)
Link | Leave a comment | Add to Memories | Tell a Friend
(no subject)
Dec. 27th, 2006 | 10:42 pm
Weeee! Back in Edinburgh. :)
Hope everyone had a nice christmas! Mine has been unusually awesome. Managed to see the entire family including 2 toddler nieces. ( They enjoyed PhotoBooth immensely. )
I've mastered the controls of my new model helicopter and a whole chunk of my Amazon wish-list appears to have been magically bought for me. :D
So just warming up the flat now ready for Sarah coming back up tomorrow.
For the geeks amoungst you my current muse is looking at adding Ogg Theora support to Handbrake.
Wow.. that's a lot of link things for one journal update..
Hope everyone had a nice christmas! Mine has been unusually awesome. Managed to see the entire family including 2 toddler nieces. ( They enjoyed PhotoBooth immensely. )
I've mastered the controls of my new model helicopter and a whole chunk of my Amazon wish-list appears to have been magically bought for me. :D
So just warming up the flat now ready for Sarah coming back up tomorrow.
For the geeks amoungst you my current muse is looking at adding Ogg Theora support to Handbrake.
Wow.. that's a lot of link things for one journal update..
Link | Leave a comment | Add to Memories | Tell a Friend
Woopah!
Nov. 7th, 2006 | 03:28 pm
mood: frikkin awesome
Passed with just two minors! I rock!
Link | Leave a comment {6} | Add to Memories | Tell a Friend
Driving test
Nov. 7th, 2006 | 10:10 am
mood:
anxious
I've taken the day off work to take my driving test this afternoon. Stressful stuff..
So stay off the roads for the next few hours, and I'll post again later.
So stay off the roads for the next few hours, and I'll post again later.
Link | Leave a comment {1} | Add to Memories | Tell a Friend
(no subject)
Oct. 23rd, 2006 | 08:16 pm
My computer is off to the laptop correctional facility. Hopefully when it gets back it won't abruptly power off every few minutes. .. apparently it'll be 1-2 weeks, so for now I've taken over Sarah's.. :)
It's been my intention for a while now to learn some Ocaml, so recently I've been using it to solve some puzzles. I've not got the hang of it yet though. One of the puzzles I can solve in 250ms with C++, but in Ocaml I can't even do it in under 10 mins. I'm obviously not using it properly.. :(
Anyhoo, not a very exciting entry for you all.
It's been my intention for a while now to learn some Ocaml, so recently I've been using it to solve some puzzles. I've not got the hang of it yet though. One of the puzzles I can solve in 250ms with C++, but in Ocaml I can't even do it in under 10 mins. I'm obviously not using it properly.. :(
Anyhoo, not a very exciting entry for you all.
Link | Leave a comment | Add to Memories | Tell a Friend
3 Majors and 11 Minors...
Oct. 21st, 2006 | 07:37 pm
So yeh, failed the mock test then.. :/ Apparently it's "not too bad" for a mock, and the examiner reckons I'll be able to fix the problems before my final test (November 7th..). I knew where I'd messed up before he told me, so at least I'm aware of what I should be doing.. :)
Link | Leave a comment | Add to Memories | Tell a Friend
No more games..
Oct. 20th, 2006 | 05:18 pm
The powers that be have banned computer games at work. Highly controversial if you ask me. I fear it's the start of a slippery slope leading to them restricting our internet access in some draconian way. (They've already banned Google Talk.)
What I find funny is that we have a corporate "team building" thing coming up. So they want us to socialise, be friends, and work as a team with each other,.. just not in the office? :p
Anyway, in other news.. We ordered one of these DVR gadget things for the flat. Will make up (and then some) for the big telly not having freeview yet. :)
I have my mock driving test tomorrow. I hope I have one of my "good" days so that I get an accurate measure of my driving.
What I find funny is that we have a corporate "team building" thing coming up. So they want us to socialise, be friends, and work as a team with each other,.. just not in the office? :p
Anyway, in other news.. We ordered one of these DVR gadget things for the flat. Will make up (and then some) for the big telly not having freeview yet. :)
I have my mock driving test tomorrow. I hope I have one of my "good" days so that I get an accurate measure of my driving.
