Sunday, October 20, 2013

Tygers - Chapter 2

When Sophie the Tiger was big enough, she loved to go on adventures with her big sister Rosie. Rosie loved to teach Sophie all the things she’d learnt, like how to prowl, how to growl as ferociously as possible, how to catch fish and which ones are the tastiest, and the best places to lie in the sun on a warm day. Sophie loved to follow Rosie around and try to do whatever she did. But mostly the two sisters loved to be near each other.

One sunny autumn afternoon, after they had spent the morning practicing their ferocious growls on a small family of beetles (or perhaps it was a family of small beetles, I don’t quite recall), and the beetles had gotten so upset that they had scurried into a crack in the ground and refused to emerge until the following spring, Rosie and Sophie were lying on a grassy bank watching the stream flow lazily by, and wondering what to do next.

Rosie lay on her back in the warm grass, feeling the sun on her tummy fur. A mother duck was swimming downstream, leading her family of five fluffy ducklings. She gave a cautions “quack” when she saw Rose and Sophie, and lead her ducklings towards the middle of the river. The last and littlest duckling swam curiously towards the bank. Sophie turned and sniffed at the duckling who paddled away furiously to catch up with his mother and siblings.

“I know,” said Rosie, “Let’s go and look for dinosaur bones.”

Sophie jumped to her paws. “Are there any dinosaurs?” she asked, her ears quivering with excitement. “I’ve never seen one.”

“No,” said Rosie, “the dinosaurs are all gone. But some of their bones have turned into fossils. I learnt about them at pre-school when we went to the Hall of Science.”

“What’s a fussel?” asked Sophie.

“They’re things you dig up,” said Rosie, not being quite sure herself.

“You mean like a carrot?” asked Sophie. “I dug up a carrot once. But I gave it to a bunny rabbit.”

“I think so,” said Rosie. “Only I think you have to dig deeper. More like a potato.”

“Oh,” said Sophie, and thought a little. “They have potatoes at that people-village up in the hills,” she said. “Maybe they grow fussels there too?”

“Yes,” said Rosie. “They’re sure to”, she said. “Come on. Let’s go.”

And so the two tigers headed off together.

Rosie and Sophie walked side by side along the path that ran by the side of the river. After a while the path became narrower and Sophie and Rosie had to walk one in front of the other. They came to a place where a narrow path lead off to the right. There was a post in the ground, and a board nailed to it upon which was written “Little Pig”. Underneath was a smaller board saying “No soliciting”, and underneath that was a piece of note paper, upon which was written, “No Big Bad Wolves”. Rosie turned to Sophie and asked “Shall we see what’s down here?”. Sophie nodded.

The path ended in front of a small brick house. On the porch, a small, pink pig sat in a rocking chair, chewing a piece of grass. “Hello little Tigers,” said the pig.

“Hello,” said Rosie curiously, “Do you live here by yourself?”

The pig explained that his two brothers used to live next door, but that their houses had been demolished due to not meeting the local building codes, and they had moved to Florida, so he was feeling a little lonely. “Would you like some tea?” he asked.

Rosie and Sophie followed the pig into his house. He made a large pot of tea and put out a plate full of scones with a bowl jam and and another of clotted cream.

“We’re looking for dinosaur bones,” said Sophie after she’d finished her fourth scone. “Would you like to come?” she asked, and licked a blob of clotted cream of her nose.

“Oh yes!” said the piggy. “I have a a very good nose for finding things that are buried.”

The two tigers and the pig set off through the forest. The pig put his snout to the ground and sniffed and the tigers followed. They threaded their way between the trees and up a muddy river bank. Suddenly Rosie stopped. “Look!” she called. Sophie came to stand beside her and the pig scurried back to see what she had found.

Rosie pointed with her nose at the mud in front of her. “Tracks,” she said. The other animals peered at the paw prints in the mud.

“What are they?” asked Sophie. “They look like tiger paws, but they’re too small.”

“But they’re much too big for a kitty-cat,” said the piggy.

“Maybe a leopard,” suggested Rosie thoughtfully. “Let’s follow them and see where they lead.”

The two tigers and the pig set off, this time with Rosie in the front. The tracks continued through the trees for a little while longer and then climbed a hill. At the top was a mound of loose earth. The pig sniffed. “There’s something buried underneath,” he said. Sophie and Rose started to dig with their big front paws.

After about ten minutes, Sophie’s claw hit something hard. There was a small metalic “clink” sound. They carefully dug a little further and brushed the dirt away to reveal a large wooden box, fastened with iron straps and hinges. It was too heavy for either tiger to lift by herself, so Rose took one side and Sophie took the other, and together they lifted the chest out of the pit.

Fortunately there was no lock on the box. But the hinges had rusted and creaked loudly as the three animals pushed and pulled at the lid to open it. At last, with one last creak, the like swung open, and inside Rosie and Sophie saw the largest bone they had ever seen. It was a soft mottled white colour, smooth, and several inches longer than Rosie’s tail. Around one end was tied a paper tag on which the words “This dinosaur bone belongs to Baby” were written in large letters, and on the other side of the tag was written just “Baby” in big letters.

“Wow!” said Sophie, licking the tip of her nose.

“We’d better put it back,” said Rosie. “It belongs to someone else.” They put the bone back in the box, lowered it into the pit, and filled it up with earth until it was just as they had found it.

When they were done, Rosie and Sophie noticed that the pig was busy sniffing around the base of a tree and burrowing with his snout. After a minute he came up holding something black and wrinkly between his teeth. “Look!” he cried triumphantly.

“What is it?” asked Rose and Sophie together, coming a bit closer.

“It’s a truffle,” said the pig. “They’re delicious, and only we pigs can find them. C’mon!” And he trotted back to his home, holding the truffle proudly between his teeth, while Rose and Sophie followed curiously behind.

By the time Rose and Sophie reached the pig’s little brick house, he had already put on his apron and put a large pot of water on the stove to boil. The pig made three plates of fresh pasta and put shaved truffles and parmesan cheese on top. The two tigers were so hungry after all the digging they’ed done, that they both licked their plates clean. They both said “Yum!” and thanked the piggy lovingly for his hospitality, and then went on their way, purring softly to themselves.

Thursday, October 3, 2013

Making Visual Studio Solutions, CMake and Cygwin Play Nicely Together

I'm currently involved in development and maintenance of a set of command-line tools for analyzing Affymetrix micro-array data. The tools are developed in C++ and intended to be platform independent (compiled and tested on a couple of different Linux flavors, Windows using Visual C++, and OS X). We're working on version 2.0 which is the first major rewrite in several years.

Previous versions relied on separate Visual Studio solution files for Windows, and makefiles for Linux, which needed to be maintained in parallel. This was a pain, particularly in the Windows world: for Unix/Linux, Make hasn't changed much for decades, and if you learnt to use it in the 80's you'll probably still be able to get by. But, for Visual Studio things can change drastically between versions, so that the solution and project files in VS2008 and 2010 are completely different, and required a major transition. So, in version 2.0 we decided to switch to CMake to generate our build scripts across all platforms.

We've also been using Bamboo to run our continuous integration builds and nightly regression tests. For Linux this meant having Bamboo execute a bash script. So as to make things as uniform as possible between platforms, we opted to use a bash script under cygwin to run the builds and tests on Windows.

I found a number of issues and complications in getting cygwin to work with Visual Studio 2010/2012 solutions and CMake - some I found details of on the web, and others required experimentation to fix. Since there wasn't one place I could go to find out all these things, and much of the information I found was outdated, I'm going to gather them all together in one place as a public service. The intended audience is people who are familiar with CMake and bash, but struggling with getting things working in the Windows world.

Setting environment variables for MSBuild/VC++

There are a bunch of environment variables needed for running Visual Studio solutions in the command line, which can be set by one of the bat files vcvars*.bat (see, Since were doing 64 bit only, we want the ones called vcvarsx86_amd64.bat. We need to call the right one for the version of Visual Studio we're using:

# Read vcvars.bat file to set Windows tools settings
# VS2012 version
${CMD} /c "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"

Or for Visual Studio 2010:

# VS2010 version

${CMD} /c "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"

Running CMake from cygwin

First we need to pick the appropriate executables for CMake and CPack:

CMAKE="/cygdrive/c/Program Files (x86)/CMake 2.8/bin/cmake.exe"
CTEST="/cygdrive/c/Program Files (x86)/CMake 2.8/bin/ctest.exe"

We're doing an out-of-source build, so we use two environment variables, SRCROOT for the source directory (in our case an svn checkout), and CMAKEROOT for the build directory. We may have to create the CMAKEROOT directory if it's not there already:

# Create cmake directory if not present
if [[ ! -d "${CMAKEROOT}" ]]
  mkdir "${CMAKEROOT}"

In order to run CMake we'll need to specify the Generator, and to feed it the source directory in Windows path format. If you do "cmake --help" it will provide a list of available generators. In our case we want "Visual Studio 11 Win64". To get the directory name in the format CMake wants, rather than in cygwin format we use the "cygpath -w" utility.

This next bit is important:

We now come to a particularly annoying and hard to diagnose bug (see cygwin by default declares certain environment variables like TEMP and TMP. CMake will use certain environment variables, including tmp and temp,  In cygwin this is fine and good, but Windows applications, and particularly MSBuild, do not distinguish between environment variables based on case. So when you run MSBuild after CMake in the cygwin environment, MSBuild will die because it sees that there are multiply defined environment variables.

The worst thing about this is that, once you've encountered the problem, simply undef-ing the relevant variables won't fix it. MSBuild starts some processes the first time it's run and those will continue to break. At this point you have to go into the Task Manager and kill any MSBuild processes before you can contiue. The work around is to undef all the variables before the first call of CMake.

This is the code from our scripts which runs CMake:

# Set the generator - VS2012 version
CMAKE_GENERATOR='Visual Studio 11 Win64'
# Have to unset some environment variables because of a weird bug with cmake under cygwin
# - see
unset tmp TMP temp TEMP
# Now call CMake
"$CMAKE" -G "$CMAKE_GENERATOR" "$(cygpath -w ${SRCROOT})"
if [ "${cmake_rv}" != 0 ]
  echo "CMake encountered errors"
  exit 1

Using MSBuild to build a Visual Studio solution file

CMake should create a .sln file and a bunch of vcxproj files (one for each target). First we need to pick the right MSBuild executable, and also decide on the configuration and platform for our build:

# This maybe system dependent
# We're going to do a 64 bit release build

Checking for errors in MSBuild

With Make in the Linux/Unix world, we can check the output value ("$?") to see if the build was successful.  With MSBuild this doesn't necessarily work. Consequently, to check for a successful build we need to generate a log file, and scan the log file for an errors message - the log file should contain the line '0 Error(s)' if it was successful. (In the following the environment variable SLN_FILE is set to the name of the solution file).

"${MSBUILD}" ${SLN_FILE} /fl /property:Configuration=${BUILD_CONFIG};Platform=${PLATFORM}
if [ ${msbuild_rv} != 0 ]
    echo "MSBuild ${SLN_FILE} exited with status '${msbuild_rv}'"
    exit 1
grep -q '0 Error(s)' ${MSBUILD_LOG}
if [ $? != 0 ]
    echo "MSBuild ${SLN_FILE} detected errors"
    exit 1

(The /fl option causes MSBuild to write a log file).

Using MSBuild to build a Project file

Our CMake scripts are configured to create a number of additional custom targets which are not part of the default build target (do not have ALL set), such as a target regression which will update the regression test data and run the regression tests. In Linux these translate to Makefile targets which are not called as part of the default target. In Visual Studio, these give rise to .vcxproj files which are not built by default when one builds the main project .sln file.

To build these we can call MSBuild directly on a project file:

# Build regression project
"${MSBUILD}" ${REGRESSION_PROJ_FILE} /fl /property:Configuration=${BUILD_CONFIG};Platform=${PLATFORM}

And that's all. Hope this is useful to someone out there.

Thursday, August 8, 2013

The Tyger - Epilogue

When Rosie got a bit older she became a Big Strong Young Tiger. She often went out for long walks in the forest with her little sister Sophie. Sometimes they would go out walking at night: even though it could get very dark in the Forest, the fireflies would Burn Brightly lighting their way.

One evening, when Rose and Sophie were out walking, they came across a man with a big black bushy beard sitting under a tree. He was chewing on his pencil and looking despondently at a large notebook he was holding.

“Hello, I’m Rosie,” said Rosie.

“And I’m Sophie,” said Sophie.

“Oh, hello,” said the man, looking up, “my name’s Bill.”

“What are you doing?” asked Sophie curiously, coming a little closer.

“I’m trying to write a poem,” he said. “I’ve got a great beginning, but now I’m stuck.”

“Well what have you got so far?” asked Rosie.

The man cleared his throat, and read.

Tyger, Tyger, burning bright,”

he said grandly.

Rosie and Sophie waited expectantly. “Is that it?” asked Sophie after a while.

“Er, yes,” said the man, looking a little embarrassed.

Rosie padded around slowly to look over the man's shoulder at his notebook. "I don't think that that's how you spell 'Tiger'," she said.

“I can’t think of anything to rhyme with ‘burning bright’,” said the man.

“Well...,” said Rosie looking around thoughtfully, “we’re in a Forest.”

“And it’s Night time,” added Sophie.

“Forest … night... That’s it!”, cried the man, and started writing in his notebook furiously. After about ten minutes he stopped. “It’s done,” he said. “Would you like to hear it?”

“Yes, please,” said Rose and Sophie together. They sat down side-by-side to listen. The man stood up, cleared his throat again, and started to read.

After a few minutes he stopped reading. “That’s it,” he said, looking up. “What did you think?”

“Well, it’s a bit rude to tigers,” said Rosie.

“I don’t like the bit about Stars and Spears,” said Sophie. “That doesn’t make any sense.”

“Humph,” said the man crossly. “What would Tigers know about poetry anyway?”

So Rose and Sophie ate him.

Wednesday, August 7, 2013

The Tyger

A bed-time story for Rosie

Once upon a time there was a Little Tiger named Rosie. She was a Ferocious little tiger - she liked to Roar and Growl and Pounce on things. Sometimes she would pounce on her Mommy or her Daddy or her baby sister, Sophie.

Her Mommy and Daddy were great Hunters. They would go out hunting for hours. They would hunt for all kinds of things, like pizzas and sushi and occasionally a wildebeest.

Rosie also liked to hunt, but wildebeest were a little too big for her. She hunted broccoli and cauliflowers and asparagus and other yummy things. She would creep stealthily through the fields, the soft pads of her paws barely making a sound, and her stripes making her almost invisible in the tall grass. She knew to always stay down-wind so that her prey wouldn’t detect her scent. And then she would pause, silent and still, awaiting her moment. Suddenly, in the blink of an eye, she would pounce upon her prey, devouring the broccoli in a single mighty chomp.

One day Rosie’s Daddy said “how about getting some pizza today?”. Rosie was very excited by the idea. “Can I get it?” she asked. She loved to imagine the wild pizzas that roamed the countryside, rolling along on their edges like huge wagon wheels, but she had never seen one. She set out at once.

Rosie searched far and wide, wading through streams past snapping turtles, sniffing amongst the undergrowth, trying to detect the telltale scent of anchovies, pepperoni and freshly baked tomatoes. Eventually she came to a grassy field, in which a small herd of gazelle were grazing. They did look awfully tasty, and for a moment she thought about pouncing on one and bringing it home. But then she remembered that what she really wanted was pizza. She walked up to the nearest gazelle, cleared her throat and said “Excuse me Miss Gazelle,” as politely as she could, “but do you know where I might find some pizza?”.
The gazelle looked up at the hills and started to say something. But then it was seized by a moment of panic, as it realized it was talking to a Real Tiger, and bolted as fast as it could in the opposite direction. The rest of the herd scattered instantly, leaving Rosie standing alone in the middle of the field. “Oh well,” she thought, “I think she was going to tell me to go that way,” and she walked on in the direction of the hills.

After a while Rosie came to a field full of tall wheat. She looked down and saw a field mouse scurrying around and looking for seeds. The field mouse looked up and lifted his cap. “Good day to you Miss Tiger”, he said. (Field mice are not at all afraid of tigers - I don’t know why.)

“Hello,” said Rosie, “Do YOU know where I might find a pizza?”

“Don’t know about any pizzas about here, Miss,” said the field-mouse. “But this ‘ere is wheat, see!” he added. “You makes flour out of it, then you makes dough, and that you makes that into pizza. An’ bread  ‘n all, so they say.”

“Thank you,” said Rosie. She gathered up as many stalks of wheat as she could carry and went on with her search.

After a while she came to another field where tall tomato plants grew, lined up neatly and climbing up on stakes. Resting on one of the leaves of the nearest tomato plant was a red ladybug with black spots. “Hello Miss Ladybug,” said Rosie.

“Hi There!” said the ladybug cheerfully. “What’s happening?”. (Ladybugs are not afraid of anything, not even Tigers.)

“I’m looking for a pizza,” said Rosie, “have you seen any?”

“Nope,” said the ladybug, “no pizzas round here.” She thought for a moment. “But these red things,” she said, “they’re tomatoes. They’re very tasty on pizzas, I believe.”

“Thank you,” said Rosie. She picked as many tomatoes as she could carry, and continued on her way.

After walking for what seemed like an awfully long time, Rosie came to a big green field full of grass. In the middle of the field was a large brown cow.

“Mmmmmm, Hellooo Deary,” said the cow, munching lazily. (Cows are sometimes afraid of tigers, but Rosie was only a Small Tiger, and this really was a Very Large Cow, so she didn’t seem much concerned.)

“Hello,” said Rosie. “I’m looking for a pizza. Have you seen any?,” she asked.

“Mmmmmmmmm, Nooooooo,” said the cow considering. Rosie looked very sad. “But I’ve just been making some cheese,” said the cow kindly. “Would you like some?”.

“Thank you,” said Rosie, and took two large balls of soft white cheese.

Rosie was starting to wonder whether she’d ever find a real live pizza, when she smelt something, It smelt warm and inviting, like a cozy fireplace on a Winter’s night. She followed the smell into a forest and through some trees, and came out suddenly in a small clearing. In the middle of the clearing was a small wood-burning oven made of bricks, and sitting in front of it were three bears.

“I’m hungry Mommy,” said the smallest bear. “That nasty little girl with the yellow hair ate all my porridge.” 

“I know dear,” said the middle sized bear sadly. “And then she ran away before we had a chance to eat her up. Very rude I thought.”

“Humph!” said the biggest bear. “If only I had some flour, at least we could make pizza.”

“Excuse me,” said Rosie shyly, “but I have some wheat here. Would you like it?”.

“Thank you Little Tiger!” said the big bear. He took the wheat and ground it into flour. Then he added some water and salt to make dough. He rolled it out into two large round disks.

“It’s a pity we don’t have any tomatoes,” said the middle sized bear. “It’s so much better with them.”

“I have some tomatoes,” said Rosie. “Would you like them?”

“Landsakes! Thank you Little Tiger!”, said the middle size bear. She sliced the tomatoes and spread them over the two disks of dough.

“But I like cheese on my pizza,” said the littlest bear sadly.

“Oh, I have some cheese,” said Rosie. “Would you like it?”

“Oh, Goody!” said the little bear excitedly, “Thank you Little Tiger!”. He took the cheese balls from Rosie and gave them to his mother who sliced them and put them on top of the tomatoes. 

“Really,” said Rosie, licking her nose, “it’s a pity we don’t have any anchovies”.

“Oh, we have lots of those!” said the biggest bear, taking a small rectangular tin off a large pile. “They were on special offer at CostCo last week.”

The middle sized bear opened the can and put the anchovies on top of the cheese. Then the biggest bear put the two disks of dough into the wood-burning oven. After a little while they started to smell very good indeed.

Just when Rosie was feeling like she couldn’t wait any longer, the big bear took the two disks out of the oven. Magically they had transformed into the two most delicious looking pizzas that Rosie had ever seen.

“Would you like one?” asked the big bear.

“Oh, yes please!” said Rosie. “Thank you very much!”.

“Not at all,” replied the big bear. “Thank you!”. He placed one of the pizzas in a square cardboard box and handed it to Rosie.

Rosie proudly carried the pizza home for her family to eat for dinner. But it was a long way back and she was getting to be very hungry, so she did stop and eat two slices on the way.

Tuesday, April 16, 2013

The Tortoise and the Snail

A Morally Instructive Tale of Romance, Suspense and Inter-species Competition

Once upon a time a snail and a tortoise met in a forest and started to argue about who was faster.
“I’m faster than you,” said the tortoise.
“I’m faster than you,” said the snail.
And so they decided to have a race.

All the animals in the forest came out to watch: the rabbits and the chipmunks, the squirrels and the field mice. Even a hedgehog came out of hibernation early so that he could set up a concession stand selling slugs. His name was Bernard Tiggiewinkle and I don’t think he did much business.

The race course was set up in a small clearing at the top of the forest. The tortoise and the snail were lined up behind the start line. A hare, who was a veteran of many races in the forest, said “Ready... Set... GO!”, and all the animals started shouting “Tortoise! Tortoise! and “Come on Snail!”.

 After a while a little boy bunny said to his mother, “Mommy, why aren’t they moving”, and his mother said “They are moving dear: the tortoise’s front foot just crossed the start line.”

The animals watched and waited.

A little bunny girl said, “Daddy I’m bored.” “Me too,” said her father.

One by one the animals wandered off. The rabbits took their little bunnies to get some carrot gelato as a special treat, and the squirrels went home to watch the season finale of Game Of Nuts which was on cable that evening.

The little bunny boy and the little bunny girl grew up and  left home to go to college. They graduated, fell in love and, after a long (by rabbit standards) courtship lasting almost 15 minutes, they decided to start a bunny family of their own.

One day, some years later, they decided to take their children for a hop in the forest, and happened to come to the part of the forest where the tortoise and the snail had had their race. As they hopped along, they told their children about the day when they were young and their parents took them to see the race. When they came to the clearing they found the grass had grown tall, and the clearing was full of wildflowers. And there, in the middle, were the tortoise and the snail, still neck-and-neck about three feet from the finish line. The little bunny children looked up from their iPhones, said “Yeah, whatever” and went back to sending text messages to their friends.

The morale of this story is, races between snails and tortoises are extremely boring.

Friday, March 22, 2013

Minox film holder for Nikon CoolScan film stanners

For quite a while now, I’ve been fascinated by subminiature cameras, particularly the 8x11 Minox family of cameras. It’s still possible to find films for the Minox, and developing b&w at home is actually much easier than other film cameras. (For colour films, I send them to Blue Moon Camera in Oregon). However, I don’t have anywhere to set up a darkroom at home, so I have to rely on scanning the negatives and printing digitally.

The Minox lenses in recent Minox cameras (late B’s onwards) have a resolution of over 160 lpmm (the earlier Complan lens, using a curved film plane are even higher). This is much higher even the very best 35mm lenses. To get the full benefit of this requires using a very fine grain film and developer. Some people use films like Agfa Copex or Rollei’s ATP with special low-contrast developers to get spectacular results. The main limitation to quality, then, is the ability to make sufficiently high-resolution scans. For this purpose dedicated film scanners such as the Nikon CoolScan family are much better than flat bed scanners.

The difficulty that I’ve found scanning on this scanner was how to hold the film sufficiently flat. It the film is allowed to curl then the scanner, when focused on the center of the frame, will blur the edges.

My first successful film holder was made from two pieces of 2mm thick aluminium sheet with an 8x11mm hole and screws to clamp the film, and fit in the slide adapter of the film scanner. It worked pretty well. Lining up the frame and clamping the film was a little awkward, but could be quite quick with practice.

Recently I decided to try to design a better holder, and this time have it 3d-printed by Shapeways. I decided to use some magnets to apply a small amount of pressure and bought some tiny 3mm magnets on Amazon.
I designed the two parts to fit together using FreeCAD, and very simple open source CAD program.

The top part I make slightly curved to avoid catching on the slide holder mechanism of the scanner but still be stiff enough.

My first attempt at printing used Shapeways' basic plastic in polished finish. The surface came out nice and smooth, but the tolerances weren’t quite good enough, and, specifically the various measurements came out slightly small. So I tried again using their “frosted detail plastic” and making some adjustments. This time the dimensions were closer, but the surface of the plastic was a little rough. I found it could be made nice and smooth easily by using some very fine emory paper.

The minimum wall thickness allowed for this type of plastic is 0.5mm, which means that there’s 1mm of material separating the two magnets on each side. I wasn’t sure if the very tiny magnets would be sufficiently powerful to hold the two pieces together and to flatten film, but so far they seem to work for the films I’ve tried out. It might be necessary to use larger or more magnets for films with a lot of curl.

This is the new film holder next to my previous film holder:

This photo shows the two parts separately:

And finally seen here with a film in place:

Saturday, February 23, 2013


I have been contemplating the problems faced by Dachshunds, and other dogs with similarly low ground clearance, in negotiating tall bumps or other tall obstacles..Specifically it seems reasonable to suppose that, halfway across a bump of sufficient height, a Dachshund would bottom-out, unable to propel itself forward with either its front or hind legs (see Fig 1). Given the popularity of the breed, it is strange then that, when out walking, I don’t frequently see a Dachshund stuck halfway across a bump with all four legs thrashing wildly in the air. Nor, when I see a  Dachshund-owner walking their dog, do I see them having to go back to pick up their flailing dogs and set them down on level ground.

One possible explanation is that Dachshunds have learned to instinctively arch their spines upwards as they go over bumps in  a sort-of inverted limbo dance (see Fig 2). However, while this would help the dogs go over some medium sized bumps, it does not seem an adequate solution overall.
After some thought reached a remarkable conclusion: Dachshunds have evolved the ability to shift their center of gravity by a few inches forward and backwards. They use this ability to see-saw back and forth on the top of a bump, gaining traction first with their hind paws and then with their front paws, in order to pull themselves over (Fig 3).

At first this conclusion might seem surprising, but after considering the problem carefully I'm convinced this must be the case. Nevertheless, I think with would be appropriate to carry out some experiments to verify this theory. I will require the loan of one Dachshund, some thumbtacks and a piece of string.