Thursday, September 27, 2012

Printable Wall Calendar For 2013

Photos of a wall calendar for 2013.

Time for printing a new wall calendar for the coming year 2013. This one is similar to the one for 2012 - I made the days a bit bigger, and interwove the months to a continuous flow of days, to save some space. To identify the months, I gave each month its own color. Not sure how happy I am with these changes, but I'll just have to try it in real life and see what improvements I can come up with for 2014...

The calendar is on two pages, with January to June on the first and the rest on the second. The weeks begin with Mondays. Weekends are marked by a less bright white than the week days.

Download the pdf and print it on a regular printer. (The Google Docs viewer doesn't seem to understand transparency, so it doesn't show the month names or the weekend day boxes, but they'll be there when you print.)

The calendar is made in Inkscape, my favorite free vector graphics editor. The correct date/weekday arrangement for 2013 comes from Inkscape's Extensions -> Render -> Calendar function.

Monday, September 24, 2012

Emulsion separation time lapse

Fluid turbulence in a bottle of hairspray. Johanna bought a bottle of hair spray, consisting of two fluids, a clear and a white one. The product. The spray should be shaken before using, so that the two fluids mix. Above are some snapshots of turbulence achieved by gently shaking the bottle.

After a while, if left alone, the two fluids separate again. We've been quite fascinated by the mixing and re-separation processes.

This is a time lapse video of the hair spray, taken after shaking the bottle. The video starts with the emulsion completely white, that is, with the two solutions mixed. The whole separation process in the video takes about twenty hours.

From each frame in the video I cut a narrow vertical slice, always at the same position in the frame - this is apparently known as 'time slicing'. When these slices are placed beside each other a picture new is formed, where the horizontal direction represents time.



Three regions with different behavior can be seen in the picture. Here exponential curves have been fitted to the interface between the two fluids, in order to find the time constants. I expected to find a simple exponential time dependence, based on a vaguely remembered chemistry demonstration, but the result turned out to be more complex. When I searched for some explanation, I could only find complicated theories for how foams drain (pdf), and no mention of the simple exponential behavior.

Sunday, September 16, 2012

Decagon Girih Solutions



In an earlier post, I wrote about two solutions for the pattern on the ten-sided Girih tile.

In the middle is the standard one, also in paper in Science. The one on the right, with straight lines, I saw in a post on Robodino about laser cutting Girih tiles. The one on the left I might have seen somewhere, or made up myself... Anyway, these are three different solutions with tenfold rotational symmetry.

Wikipedia says: "Most tiles have a unique pattern of girih inside the tile which are continuous and follow the symmetry of the tile. However, the decagon has two possible girih patterns one of which has only fivefold rather than tenfold rotational symmetry." - but it doesn't say which ones they mean.



After some playing around, I realized that there are all kinds of ways to connect the patterns while still (I think) following the rules. The ones above have only a twofold rotational symmetry. These are probably not the only ones, but with their low symmetry, they are not the most interesting...

Instead, I'm really happy about these! They all have fivefold rotational symmetry. The upper left one is the one we cut in acrylic, and the rest are new. The lower left one might not quite conform, since it has another type of crossing in the middle, but who cares? It's pretty!

All in all, these are eleven possible girih patterns for the decagon. Could Wikipedia be wrong on this?

Wednesday, August 29, 2012

SD card benchmark on the Raspberry Pi

This thread in the Raspberry forum and this post discuss benchmarks of different SD cards for use with the Raspberry Pi. I wanted to test my own card, and to do it in the Pi itself. An important conclusion of the two discussions is that the speed of small random writes is important for running an operating system of the card. What the card manufacturers report is the sequential read and write speed which can be substantially higher - these are important in cameras for example.

The posts suggest the program iozone for measuring the SD card performance. I could not find it as a raspbian package, but it was easy to compile from source. Very quick instructions follow.

wget http://www.iozone.org/src/current/iozone3_408.tar
cat iozone3_408.tar | tar -x
cd iozone3_408/src/current
make linux-arm
./iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2

The final command runs the test. This command line was suggested in the raspberry forum, for the options run iozone -h . Note that iozone tests the device where the current directory is located. The flags -e and -I are significant here. -e include fflush and sync in the timing, while -I requests the use of direct I/O, without any caching.

For my SanDisk 8G class 4 card (8 €, Media Markt) I got the following results. See here for a picture of the card and packaging.
                                          random  random   
reclen   write rewrite     read   reread    read   write
     4     913     991     3279     3278    3061     457
   512    5292    5370    11305    11304   11218    1319
 16384    5122    5442    11442    11442   11442    5406

The column reclen gives the size of the data blocks tested, while the other columns are speeds in KB/s. For this card, the important figure for small block random write is quite respectable but not as high as what other people in the threads above have reported for the best cards. Anyway, SanDisk cards of class 4 or 6 seem to top the list.

But benchmarking a SD card seems to be a more complicated topic than running the short test above. In practice using RAM for cache gives a huge performance boost, in particular for small writes. My guess is that whether the small random writes will be a bottleneck or not is very much dependent on the application.

I ran two further tests with iozone, using the flag -a (for automatic): once without cache enabled (-e -I) and once with cache. In the -a mode, iozone runs tests for many different file sizes and block sizes. Each test ran for over an hour before I interrupted it. This made me wonder if this amount of writing will wear out the SD card. So far I have seen no problems.

As long as the data written fits in the RAM, cache gives a huge improvement. At a file size of 64 Mb there is a significant speed drop when the cache becomes too small.   

Monday, August 27, 2012

Beaded bowl surfaces


Hexagons side by side forms a flat surface, with zero curvature. Reading Make Magazine's Math Monday, I learned that a pentagon among the hexagons makes the surface  curvature positive, like the surface of a sphere. A heptagon does the opposite - it creates a saddle surface, which has a negative curvature.

Here, I've built the same bowl-shaped trial surface from white glass beads and from Magnetic spheres. The surface is formed from hexagons, with a pentagon in each 'corner', to make the surface curve.

In an earlier post, I used only pentagons, which shapes the surface into a sphere.

Monday, August 20, 2012

Beads from scraps



Using leftover Fimo clay from the previous two projects, the instruction beads and the red flower cane, I made some sets of mixed striped beads. Below are the basic steps: rolling out the different-colored scrap pieces and bunching them together, then rolling out the bunch, cutting up and re-bunching and so on, twisting slightly, and the stripes get thinner.



When I was happy with the stripes, I cut the roll into pieces and formed round beads. Part of the roll I made thinner, and squared it before cutting, creating small elongated square beads.



Above are also shown some darker beads made with a similar method, with scraps from the instruction beads.



This single bead is made from leftovers of the petal in the red flower - the bead actually shows the pink-and-orange stripes which were supposed to show in the red flower as well, but the pattern got way to small when reducing...



Friday, August 17, 2012

Trying out the Raspberry Pi

I am a happy owner of a Raspberry Pi - a tiny (and really cheap) computer, capable of running Linux. Now I too am a part of the Raspberry revolution. I am just starting to try it out, but I already got our platform game running on it! More on the game will follow in a later post, first some notes on the Pi itself.

I decided to try out the Raspbian flavor of Linux on the Pi. I chose this for the hardware floating point support, and since the Raspberry Pi foundation recommends it.

I currently don't have an USB keyboard, so I hoped to access the Pi over the network with ssh. Luckily, Raspbian is set up with an ssh server running. The only things required is to make sure that the Pi gets an IP address when it boots, and then find out which IP it got so that you can ssh to it.

I connected the Pi to a laptop running ubuntu, and tried to use the network manager on the laptop to give the Pi an IP address with DHCP when it boots. Sadly, this did not succeed. Apparently the laptop Ethernet interface stays "down" as long as nothing is connected to it (the Pi is off), and the Pi got no IP address when it booted.
Fortunately it was easy setting up a DHCP server on the laptop manually:
1) Turn the network manager off, so it does not get in the way
2) sudo ifconfig eth0 192.168.0.2 #enable eth0, give it an IP address
3) sudo udhcpd -f
4) boot the Pi, wait a while.
5) udhcpd prints out the IP address it offers
6) ssh to the address. User name pi, password raspberry.



If you have the Pi connected to a TV or monitor, you will see the Pi printing some messages while it boots, and then launch the raspi-config program.  Without a keyboard raspi-config is not usable, but you can still access the Pi with ssh. Raspi-config seems to start automatically at each boot, until you have completed it once.  It can be run from a terminal at any time.  If one wants the Pi connected to the internet, some more networking is needed than what I describe above. A router would probably be the most convenient solution. I have had success with Windows "internet connection sharing".

EDIT: When trying to share an internet connection from an Ubuntu laptop to the Pi, this bug bit me. After the suggested work-around, sudo killall dnsmasq on the laptop, I could boot the Pi and it got an IP address. Then the next problem appears: how to find the IP address of the Pi? The Pi prints it on the TV or screen during boot. If no screen is connected one can use the nmap tool:
nmap -sP 10.42.0.1-254
this IP range being the one that Network Manager seems to offer. -sP tells nmap to ping all the hosts in the given range.

I have a PAL TV connected to the Pi. PAL needs a setting in the configuration file config.txt, located on the boot partition (the small, FAT one) on the SD card. Either edit this file on the card and uncomment the line
sdtv_mode=2
or use raspi-config on the Pi.



In this discussion and here I found interesting observations about which SD cards work well with the Pi. Apparently the fancy and expensive cards, called Class 10, are not the best since they are highly optimized for sequential reads and writes. This is good for photography but not for running Linux of the card. For this application, the speed of short random reads and writes is much more important, and these speeds may well be much better on cheaper cards of lower class. I got an 8 Gb Class 4 Sandisk SDHC card from the local Media Markt for 8 €. It seems to work well, but I have no serious benchmarks yet.

Wednesday, August 15, 2012

Red flower cane beads


A flower cane made from the magenta and orange Fimo polymer clay from this set. The center is made of scraps from that checkered cane. First, I made some simple flat round beads by cutting slices from the reduced cane.


I then reduced the cane further, and put thin slices on a white clay sphere, made from half a Fimo strip. Twelve 1 cm slices fit covered the sphere nicely, in a dodecahedral formation.


Quarter-strip spheres were covered by six slices (cubic formation) and half-strip cylinders carried two rows of four slices. Leftover flower canes I stacked and rolled until they were tiny, wrapped them in white and cut into small flat beads.

Monday, August 13, 2012

Checkered instruction beads

Checkered beads and a Fimo set.
A friend of mine bought a Fimo set, containing magenta, orange, black and white clay. We made some square checkered beads, following the instructions in the box - except for tweaking the colors a tiny bit: we mixed 1:5 white into the orange and magenta, to create a larger contrast for the black.

Thursday, August 9, 2012

Bubbles III

bubbles in glasses
A beautiful phenomenon discovered while doing the dishes.

Tuesday, July 31, 2012

Girih tile math

Girih tile angles.All angles that appear in the girih tiles are multiples of 36 degrees, an angle that appears in a regular decagon. The girih pieces are strongly related to Penrose tiles: each girih tile can be decomposed into dart and kite Penrose tiles. The Penrose tiles are famous for creating aperiodic tilings, patterns that do not repeat themselves. Aperiodic patterns are possible to create with the girih tiles as well - for example, girih may be laid in a pattern of fivefold rotational symmetry. Fivefold symmetry is impossible in periodic tilings.

Each girih tile can be constructed of smaller girih tiles. The Penrose tiles have the same property. If this subdivision is repeated, it may lead to an aperiodic tiling - depending on the rules for replacing large tiles with smaller ones. More on this in this article by Raymond Tennant (pdf).

From the paper in Science.

We first heard about these tiles in a paper in Science (here without subscription)

Girih tiles with puzzle tabs.We wanted to give our pieces some jigsaw-puzzle-like tabs to keep the tiles aligned when building, but the pentagon creates a parity problem. Instead we drew a zigzag shape on each side. Now all the sides are identical - no parity problems - and the sides align nicely.

The knot pattern on a girih tile.The knot pattern on each piece is two straight lines in from the middle of each edge, at 54 degree angles. Where these lines meet inside the tile, they are joined. For the other tiles, the rules are unambiguous, but for the ten-sided pieces, Wikipedia mentions that there should be two solutions (but all pictures I've seen show only one) Well, after some thinking, we found another solution (probably 'the' other solution), so we're happy to show our ten-sided pieces with their different knot patterns.

EDIT: Some more decagon solutions.

Two decagon solutions.

The girih drawings for laser cutting and more pictures of the tiles and of the laser cutting process.
Related Posts Plugin for WordPress, Blogger...