Mikedowney.co.uk
What's New
Site Map

Diary
Astronomy
Bits N Bobs
Computing
Food And Drink
Links
Photography
Welcome


Recipe Collections
Recipe A Week 2013
Recipe A Week 2010
A-Z of Regional Cakes
Alphabet of Nations

Mandelbrot Set on the Atari ST

Story location: Home / computing /
29/Nov/2015

In the early 90s I wrote a Mandelbrot Set generator in 68000 assembly language on the Atari ST. The 68000 processor didn't have any floating point arithmetic so I wrote a set of fixed point arithmetic routines with precision ranging from 16bit, 24bit and 32bit. These all had 8 bits for the integer with the remaining holding the fraction part.

I managed to find a copy of the program and got it to load in an emulator. The Atari takes around 10 seconds to draw, and only uses a 200x200 window. A couple of years ago, I wrote a Java version which works as an ImageJ plugin. This version is much faster (0.07s for a 800x600 image), which works out as 1700x faster than the Atari, despite only being clocked 300x faster. Processor design improvements and hardware floating point probably account for much of this increase.

The atari version can be downloaded here. The ImageJ version is available here (ImageJ and Java8 required - an older version which works with Java6 is also available)



Mandelbrot Set animation

Story location: Home / computing /
27/Nov/2015

A couple of years ago I wrote an ImageJ plugin to draw the Mandelbrot Set. I recently updated it to make animations (download available here).

To make an animation like the video, use the ImageJ 'polyline' tool to draw a line, with the spline option to smooth the line. Clicking on the Julia Set button will create a set of images which can be aligned using the following script:

var out = "zigzag1/";

run("TIFF Virtual Stack...", "open=[JuliaSet.tif]");
rename("julia");

var frames = nSlices;
var w = getWidth();
var h = getHeight();

run("TIFF Virtual Stack...", "open=[mandelbrot.tif]");
rename("brot");

setBatchMode(true);

for(i=1; i<=frames; i++){
    merge(i);
}

run("Close All");
setBatchMode(true);
print("Finished");
exit;

function merge(i){
imgname = "frame"+i;
newImage(imgname, "RGB black", w*2, h, 1);

selectWindow("julia");
setSlice(i);
run("Select All");
run("Copy");

selectWindow(imgname);
makeRectangle(w, 0, w, h);
run("Paste");

selectWindow("brot");
setSlice(i);
run("Select All");
run("Copy");

selectWindow(imgname);
makeRectangle(0, 0, w, h);
run("Paste");

fn =  out + imgname+".zip";
print(fn);
saveAs("ZIP", fn);
close();
}

The images will be saved in the folder given in the 'out' variable. Although this can be accomplished using the 'Combine' option in the ImageJ stack menu, the script works with virtual stacks so can handle much longer animations.



Buckwheat Pancakes

Story location: Home / food_and_drink /
08/Nov/2015

When we were on holiday in France this summer, we ate a lot of the buckwheat pancakes, both in restaurants and from the supermarket. We brought a couple of bags of buckwheat flour home with us and I meant to have a go at making when we got back.

buckwheat pancake

I made a thin batter from

  • 250 g buckwheat
  • 3 small eggs
  • about 500ml of 50:50 milk and water
  • 60g melted butter
  • pinch of salt

I'm not sure exactly how much liquid I added - I kept adding it until the mixture looked right and gave a decent thickness of pancake.

My pancakes weren't quite as flexible as the ones we had on holiday - it was hard to get them as thin and not break them while getting them out of the pan, so I made them a bit thicker. They tasted similar enough to the genuine french ones.



Regional Cakeathon Revisited: Northumberland Threshing Day Barley Bread

Story location: Home / food_and_drink / a_to_z /
01/Nov/2015

The barley bread was one of the recipes I wanted to try during the main run of the A-Z of baking but I had difficulty tracking down the barley flour. I eventually managed to find some in a vegan/health food shop in Digbeth in Birmingham but by then I had already made the Nottingham Apple Pudding.

The only versions of this recipe on-line seem to be more like a savoury scone than a bread, made with buttermilk and baking powder. I thought I would try to make a more traditional bread, using yeast. Since baking powder was only invented in the mid 19th century, if the barley is a genuine traditional food, then early versions would have used yeast.

Northumberland Threshing Day Barley Bread

I used a mixture of barley flour and bread flour, added yeast and salt and then enough milk to make a soft dough. It rose quite slowly so I left it overnight. I only made a bread roll sized loaf as an experiment but it came out ok. I will have another go sometime in the future and try a few other variations on the recipe.