Showing posts with label dogs. Show all posts
Showing posts with label dogs. Show all posts

Sunday, July 18, 2010

Gaits









This post was inspired by a discussion with my dad while walking the dogs. If you look at old paintings of horse races (see above) , their legs are completely outstretched in the front and back. These kinds of paintings, all before high-speed photography, were painted at a time when people didn't really know what horses looked like when they're running.

In 1878, our very own Leland Stanford settled the debate over whether horses are ever fully airborne while running: he organized the first ever example of a high-speed photo shoot (and hence the forerunner of motion picture technology) . Here's the photo, taken on June 10, 1878, at his Palo Alto track.

Here, I'll describe walking (actually the most complicated of gaits) :

The dog alternates between two and three legs supporting the body. Thus, there are eight 4C3 (three-leg combinations) plus 4C2 (two-leg combinations) minus the two combinations where you have the two front legs at the same time and then the two back legs at the sam time. That's four each. It's an eight-beat cycle, which means that after eight steps/lifts, it starts all over, like a video reaching the end and starting again. Each odd beat, for example, the dog has two paws down, and each even one it has three.

Viewing the odd and even beats separately, you can see that on each paw stays down for n beats, where n is the number of paws down on the particular beat. Thus, in the whole cycle, each paw stays down for n=2 + n=3 = 5 beats.

Here's a diagram for the odd beats (let the dot represent a placed paw) :
0 •  |  0 •  |  • 0  |  • 0
• 0  |  0 •  |  0 •  |  • 0
Which, if you think about it, is really the only way you can cycle through those four positions if you adhere to each paw staying down for two beats. There are six possible orderings of the four positions (4! arrangements, but /4 for the cycles) . If you think of the above ordering that we know works as the order 234 (1234) , then you see that to avoid jumping from a position to its opposite, i.e.:
|  0 •  |  • 0  | 
|  0 •  |  • 0  | 
or the equivalent other (the diagonal mirror) , you have to come up with an order that never pairs 2 and 4 together, like above, nor does it do so with 1 and 3, which would automatically follow -- because it's a cycle, hence it repeats, so 1243 still pairs 1 and 3 at the head and tail. So, to avoid such a pairing, your only other possibility is 1423. Or, you could work it out as ordering the letters abB such that the 'b' and the 'B' are never together, so you just fix one at the start (one possibility of the remaining 2! is good) and same for the other, which gives you 1+1=2 total ways to avoid the jump. So, for now let's just remember: there's only one position and its mirror that work.

As for the three-paw steps, you can view the cycle as each next beat. Like so (to view the whole eight-beat cycle, the i^th three-paw beat in this cycle is the beat right after the i^th two-paw step) :
0 •  |  • •  |  • 0  |  • •
• •  |  0 •  |  • •  |  • 0

What about the other five possibilities? For example, how about it be such that the paw that lifts is the next in an anti-clockwise or clockwise circle? As in,
0 •  |  • •  |  • •  |  • 0
• •  |  0 •  |  • 0  |  • •
? Well, if you combine that with the odd beats you get the following:
  1      2   3       4        5       6       7 8
0 • |  0 •  |  0 •  |  • •  |  • 0  |  • •  |  • 0  |  • 0
• 0 |  • •  |  0 •  |  0 •  |  0 •  |  • 0  |  • 0  |  • •
, where 
1|2|3|4|5|6|7|8
the front left paw goes 0|0|0|•|•|•|•|• , which is OK,
the front right paw goes •|•|•|•|0|•|0|0 , which is not,
the back left paw goes •|•|0|0|0|•|•|• , which is OK,
the back right paw goes 0|•|•|•|•|0|0|• , which is not.

front right and back left don't fit. The other five possibilities don't work, either -- but the mirror of the one that does works with our original mirror for the two-paw beats. So, basically, there are only two sets of beats that work for walking: the original that we worked out, and its mirror.

Here's some code I wrote up (quickly, so it's not very nice) you can compile to simulate walking (you'll have to #include iostream, vector, algorithm and iterator for it to compile -- I'd include it here, but the blog posting script treats it as an html tag) :

using namespace std;

void PrintEachPaw(const vector<string> &v) {
 cout << "In the order of FL, FR, BL, BR:\n";
 copy(v.begin(), v.end(), ostream_iterator<string>(cout, "\n"));
return;
}

void PrintEachBeat(const vector<string> &v) {
cout << endl;
for (size_t i = 0; i < 8; i++) {
for (size_t j = 0; j < 4; j++) {
if (j == 2)
cout << endl;
cout << v[j][i];
}
cout << endl << endl;
}
return;
}

int main (int argc, char *const argv[]) {
vector<string> v;
string a, b, c, d;
v.push_back(a);
v.push_back(b);
v.push_back(c);
v.push_back(d);
for (size_t i = 0; i < v.size(); i++) {
v[i] = "........";
for (int j = 0; j < 3; j++)
v[i][((i*2)+j)%8] = '0';
}
string temp = v[2];
v[2] = v[1];
v[1] = temp;
PrintEachPaw(v);
PrintEachBeat(v);
return 0;
}

Thursday, July 15, 2010

Dog Trapped in Hot Car Honks to Alert Owner

Two days ago in Pennsylvania, a (horribly negligent!) man accidentally left his chocolate Lab in the car for an hour on a 32˚C (90˚F) day. The dog, uncomfortable from overheating, honked the car's horn to get attention.

From the article (click on the post title) :

She said Max's owner had gone shopping and was unloading packages when she returned but forgot that Max was still in the car. She later heard the horn honking and looked outside several times but saw nothing amiss. Finally, she went outside and saw Max sitting in the driver's seat, honking the horn.


Thankfully, the dog is OK. Man, dogs are smart. Labs have a reputation for being dumb as wood, though. Not all of 'em, I guess.

Sunday, June 27, 2010

Sasha and Dima

Tomorrow I fly back to China! This means I get to see my dogs for the first time in six months. I just about literally can't wait.

Here are some photos of them, including a few puppy photos.

Sasha's (the white-ish one) about five, now, and Dima is her half-brother, now about four years old. They're the sweetest dogs anyone could ever have :)


Sunday, June 20, 2010

Popcorn Paws

If you've ever had a dog, you might have noticed that the bottoms of their paws smell like popcorn. It seems to lessen as they get older, too. Eventually, I got curious and Googled it. The folds on the paws have high moisture levels, creating a nice environment for bacteria and yeast, in particular, a bacterium called Pseudomonas, which is known for its "Frito"-y smell.

Apparently cats get this smell, too, but because they groom themselves, it's not as pungent.