Showing posts with label clocks. Show all posts
Showing posts with label clocks. Show all posts

Sunday, April 8, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 4

Welcome back! Before you read this hint, make sure you take a look at the preceding ones:

Hint 0/1
Hint 2
Hint 3

We've gotten to the point where the things I point out as hints may be old news to you. On the other hand, who knows? It's time to consider one of three (possibly four) features of this code that I'm going to call "non-core" - i.e., they modify the code's basic functionality to improve its comprehensiveness. I'm sure that the basic codebreaking literature addresses this (and maybe has a different term for it), but for my purposes, I'm going to define "comprehensive" as "the ability of a code to represent all elements of the plaintext as ciphertext." This code is about 98% comprehensive. For comparison, a non-comprehensive code might represent the plaintext
ATTACK AT DAWN, SIGNED PATTON
like this:
TTCK T DWN SGND PTTN
which is 1) not a very good code, and 2) unable to represent words such as "a" or "I". It's not as comprehensive as a Caesar cipher (95-100% comprehensiveness, depending on the plaintext) because there are letters in the original message - the vowels and the punctuation - which simply can't be written in the code.  (For interested parties: you could figure out the comprehensiveness of this code by adding up all the letter frequencies of A, E, I, O, and U and subtracting from 100.)

Assuming that you've figured out the basics of how the Angelmaker code works, I'm going to estimate its comprehensiveness at around 85%, depending on what you've realized about certain other features. You could definitely read the message(s) if you couldn't figure this bit out, but there would be some ambiguity. If you add in the feature I'm pointing out here, you'd be at around 88% - maybe as much as 90 or 91, although I haven't done the research. So: what's the deal with this?


Well?

In Hint 1, I think I pooh-poohed the idea of comparing the relative frequencies of each disk (and rightly so, as you'll probably have realized by now). Now I'm going to tell you to bring that strategy back. Where does that extra line appear? How often? Does it ever appear in the inner ring? How many sections (out of the total 12 outer + 6 inner  = 18) does it bisect? I'd also suggest that you just browse around here for a bit. Just sayin'. 

And there you go! That's three hints in one, for those keeping score at home. Oh...I only put in two? I'm so terribly sorry, I must be mistaken. Bwahahahaha. 

Have fun!

(Or for extra help, read the next hint here.)




Wednesday, April 4, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 3

My dear fellow cryptographer,

May I congratulate you on your perseverance? You've been plugging away at this code for quite some time now, it appears. Well, perhaps you haven't - perhaps you've just googled "Angelmaker code hints," blew right past my admonitions to not read the hints, and started reading hints 0, 1, and 2 straight away - but I'll give you the benefit of the doubt. 

Some suspicions about the nature of this code should be forming in your mind, and you may even be starting to test out a few theories. This is a good thing, and all the more reason that you should IGNORE THIS HINT AND SOLVE IT YOURSELF. You'll be so proud of yourself! This is a code that was meant to be broken, and it was meant to be broken by the likes of YOU. Go solve it, you young Champollion, you, and let me know when you're done. 

Still here? All right, then. I did imply that you were dedicated. Here's the third hint:
You're looking at a monoalphabetic cipher with a twist.
In a monoalphabetic cipher, one ciphertext symbol stands for one plaintext symbol. The very first code you ever broke was probably a monoalphabetic cipher, and most likely a Caesar cipher at that (you know, where you shift the alphabet however many letters to the right, so that A is encoded as E, B as F, C as G, and so forth). This is obviously not a Caesar cipher (there's no alphabet to shift), but the ciphertext symbols have a one-to-one mapping with the plain text. Now, that's a gigantic hint if you haven't made a particular realization yet, so I won't elaborate any more. (If you have made that realization...er, sorry. Getcha next time.) Go look at the picture I posted in Hint 1, then come back and read this hint again. Hopefully, you'll have one of those lovely "aha" moments that make codebreaking so satisfying. 

Oh, what's the twist? Not telling (yet). Sorry.

Happy codebreaking!

(If you need more help, here's Hint 4.)


Tuesday, April 3, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 2

So here's the situation: you've read Nick Harkaway's Angelmaker, found out there's a code (!) on the American dust jacket, you've tried to solve it, and you're stuck. Presumably you've also read hints 0 and 1 here, and didn't make a whole lot of progress. In that case, you're in the right spot. Ready for hint number two? Here it is (want to have one more go on your own? Go ahead, I'll wait. If not, highlight to read):
Trust in Knopf.
 As part of the marketing campaign for the book, Knopf released a couple of images meant to help you along. I suppose if you already knew about those, this isn't a very good hint, so here's more: initially, I found this one to be especially helpful.  Later on, this one was very useful, particularly in conjunction with the image of the back of the dust jacket that I posted in part 1. 


You might also want to watch that little video clip of Harkaway talking about writing, as it does have a tiny clue in it, but if you've made it this far, it won't tell you much you don't know.

Happy codebreaking!

If you're still stuck, here's the next hint.

Sunday, April 1, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 1

Nick Harkaway's witty, whimsical, energetic Angelmaker was released in the US a little over a week ago (you'd better believe I pre-ordered it), approximately a month behind the British/UK release. If you are, like me,  both 1) American and 2) a ginormous Nick Harkaway fan, this was an irksome (if expected) delay.(Taking a moment to note that spell-check takes issue with "pre-order" and "preorder," but not "ginormous.") It turns out that the wait was worth it, because the good people at Knopf and AAS Graphic Design have gifted us with a dust jacket design worthy of the book itself.


I will assume that if you're here, you already know that those discs are a code. (When I found this out, I took a moment to make an offering to the gods of clockwork, steampunk, difference engines, for they are good to us. Also to Ada Lovelace, oft-forgotten programmer extraordinaire.) I'll also assume that you're having trouble cracking it. To that end, I've put together a few hints to help you out, because the reward really is intriguing. 

My first hint is: STOP LOOKING FOR HINTS AND START SOLVING IT YOURSELF. SLACKER.

Seriously. Your self-esteem and your ego will thank me. This is a code that is meant to be broken (what good is it in this context otherwise?), so you know that it's not terribly difficult. Clever, yes. Difficult, no.

Ok, fine. We'll call that Hint 0. You won't be much happier with Hint 1, but here it is (last chance to do it yourself! Turn back now!) : 
Look with your eyes.
Courtesy of Arya Stark, via Syrio Forel, of course. Take a new look at the dust jacket. There are clues there to get you started - even clues to suggest the existence of a code, if you hadn't known there was one there. Look closely. Take it off the book, if you need to. The heart of codebreaking is in recognizing patterns where there don't seem to be any, so let your pattern-sensitive human brain take over for a minute, and go with your gut.



Start there.


More hints to come. Enjoy!

Ready for more? Hint 2 is here.


Saturday, March 3, 2012

Last Stop on the Going Train

The last time I wrote about the inner workings of a mechanical watch, I ended with the fourth wheel, which interacts with the final piece of the puzzle, the escapement/balance combination. The combination of gears that makes up the going train is all very well and good, but it's the escapement and the balance that make all those tiny mechanical parts into an actual timekeeping device.

An actual timekeeping device. Source:  "Nature" journal, September 22, 1887, pp. 485. For all the tiny parts and clever engineering, mechanical watches are awfully old. 
The escapement is what keeps all of the energy in the mainspring from dissipating all at once. Imagine a heavy weight raised up to the ceiling with a pulley. You're holding on to the other end of the rope. If you let go of the rope, all the energy you put into the weight to get it into the air is released all at once, and the weight puts a hole in your floor. Instead, you can choose to let it down slowly by applying some downward force to the rope. The energy released is the same, but it's over a longer period of time, and you don't do any structural damage to the building. Which method you choose depends on how much you like your floorboards or your neighbors.

The same thing happens with a mechanical watch or clock. The wound mainspring is like the weight/pulley system when the weight is all the way up at the ceiling. You, if you decide to pull back on the rope and slow the pulley's descent, are like the escapement: you control the release of potential energy in the system. If there were no escapement, all of the energy in the spring would be released in a very short amount of time. (Quick physics note: energy per unit time is defined as power, or P = W/t. The maximum energy in this system is constant [due to the physical limitations of the mainspring], so as time gets very small, power gets very big. Thus, a hole in your floor.)

Oops.

By regulating the power output at a very precise rate, the escapement turns all those gears into a useful way to keep track of time. The escape wheel is shaped differently than the rest of the gears. The teeth look a little bit like those things that keep you from driving back into parking garages once you've left.


Courtesy of Guardian Traffic Control Systems.


And with good reason - their purpose is really the same: to allow motion in one direction, but not the opposite. In a watch, the fourth wheel meshes with the escape wheel's pinion (gear with fewer teeth than the main gear that spins on the same axle and with the same angular frequency as the main gear). The pinion turns the axle, which turns the escape wheel. However, the bow-shaped bit on top of the escape wheel prevents it from spinning freely. The anchor (bow shaped bit) rocks back and forth to allow only one tooth at a time to escape.

             

Every time the anchor swings in one direction, it also gives a little push to what's called the balance wheel.

File:Alarm Clock Balance Wheel.jpg
Credit to Chris Burks for the photo.
The brass-colored wheel in the bottom center is the balance wheel. It's attached to the thin spring above it called the hairspring. The balance wheel spins until the force of the hairspring pushes it back in the other direction. This is the equivalent of having a pendulum in a standard wall clock. The time to complete one rotation of the wheel or one swing of the pendulum is constant*, so the rate at which the escapement lets the mainspring's energy escape is steady. Et voila, a timekeeping device.

So I thought I was done with tracing the energy through a watch, but take a look at this picture from horologist.com:


What's a crown wheel? or a click spring? or a click, for that matter?

There is more work to be done here.


Saturday, January 28, 2012

The Going Train - A Melodrama in Three Parts

When we last looked in, the energy in our mechanical watch or clock had entered the device by means of a purposeful winding or by taking advantage of the potential energy in a raised weight as it descended to the earth. The energy was then stored in a tightly wound mainspring (in the case of the watch), wound around an arbor and connected to a barrel, which was both free to spin and capped with gear teeth. The barrel, which comprises all of those elements - the mainspring, arbor, and the gear-capped cylinder - interlocks with the all-important going train, which is the subject of this week's adventures in horology.

The Cast of Characters:

- The Mainspring Barrel  - a strong, steady type, as we saw in last week's episode. Strives to keep things moving smoothly, but can be a bit pushy.

File:Dscf3997 FederhausKleinuhr.jpg
The mainspring barrel, with and without the mainspring. Photo from Wikimedia Commons, but lacking a source. If this is your photo, please contact me and I will credit you!
- The Center Wheel - a newcomer to the story. In lockstep with the Mainspring Barrel, it keeps a very regular schedule. The Center Wheel has the honor of holding the Minute Hand, which gets paraded around once an hour like clockwork. Also charged with driving the Third Wheel.


- The Third Wheel - an awkward but necessary character. Is only included in the train to make the math work, and he knows it. Takes his duty of driving the Fourth Wheel very seriously, however.


-  The Fourth Wheel  - The Fourth Wheel has the dubious distinction of carrying the second hand - dubious because of the diminishing number of clocks that choose to flaunt a second hand. Worries that he will soon be obsolete. Also troubling: his second function of driving the escape wheel could easily be taken over by the Third Wheel, who has upward aspirations.

He's very shy.

- The Escape Wheel  - a spiky fellow, but absolutely necessary member of the Train. Has an impeccable sense of time and knows just when to give the Balance Wheel a push to keep it in the game. Very tight with the Escapement - they have a whole system worked out to make sure things happen on time.
Courtesy of mfrasca at en.wikipedia.
- The Pinions  - Small but mighty gears, without them the math simply would not work out. They feel strong attachments to their respective main gears and ensure that communication between all the biggest players comes off without a hitch.

In a watch, the pinion is on the outside. But you get the idea - it's a smaller gear rotating with the main gear to dial up or dial down the speed of rotation.


The Plot:

The reckless and headstrong Mainspring is hell-bent on pouring all of its power into the timepiece at once. There is much consternation and frenzy - too much energy in the watch at once will destroy the lovely Hairspring and rip apart her equally entrancing sister, the Balance - and without the Balance, there can be no Time! When it appears that no solution is forthcoming, at the last minute the valiant Gear Train leaps into action.

The Action:


The spring is wound and the stage is set. The mainspring pushes inexorably on the Mainspring Barrel, which grabs hold of the Center Wheel's pinion and forces it into lockstep. The dutiful pinion transmits the force of the Mainspring Barrel to the Center Wheel.

Due to the loyal pinion, the Center Wheel does not turn with nearly the force of the Mainspring Barrel, and lets the world know of its success by spinning the minute hand around the clock face at the rate of exactly one time per hour. The Center Wheel captures the attention of the Third Wheel's pinion, which spins the Third Wheel and distributes the Mainspring Barrel's energy even further. Already things are looking up for our heroines, the Hairspring and the Balance.

The Third Wheel spins the Fourth Wheel's pinion, raising the rate of rotation in its excitement. The Fourth wheel spins frenetically around at one turn per minute. In the midst of this frantic rotation, the Fourth Wheel finds the time to drive the escape wheel - the last gear to stand between the Mainspring Barrel and the Balance.

The Escape Wheel looks odd - its teeth are spiky, and it's made of different stuff than a proper watch gear. But the Escape Wheel is a steady fellow. He knows that without him, the rest of the watch gears would rotate with abandon, expending the Mainspring Barrel's energy with no regard for Time at all. The Escape Wheel is a regulator - he rotates precisely one tooth at a time in an arrangement he's worked out with his friend the Anchor. The Anchor is precisely that - it keeps even the Escape Wheel in check. Once the Escape Wheel has been brought down to a steady tick-tock rhythm, it sends just a bit of its energy down do the Balance - just enough to keep her spinning, rather than destroying her and the Hairspring in the process.


The Denouement: 
Thanks to these brave gears, the force of the Mainspring Barrel has been dialed down to a manageable force, and is even useful in keeping the Balance - she who actually keeps the time - running. Along the way, we passed over the contributions of the Motion Work and the underlying input from Gear Ratios.

All topics for the future.


Until next time!

Tuesday, January 24, 2012

Time and a Half


 I've never been one for small aspirations. As a kid, if they told me to build a model building out of paper, I was
 going to use the longest, thinnest paper available and hold the thing together by sheer force of will. After college, I
 wanted to work in science museum, so I picked the best one I knew of, got an (unpaid) internship, and flew
 across the country to start working two months later. When I decided to learn to snowboard, I took the ski lift to
 the top of the bunny slope, strapped in, eavesdropped on a kids' lesson to learn how to stand up, and went off to
 go snowboarding.

 I mention this because I know my own tendencies, and I suspect that my next project is beyond the scope of
 anything else I've tackled so far. I want to make a wooden clock.

 I chose a gear for my first SketchUp tutorial for a reason. I have a major soft spot for anything clockwork
 (from *before* it was popular, thankyouverymuch) and a serious penchant for little
 fiddly projects. I think precision makes things beautiful, and if you've ever seen the inside of a mechanical
 watch, you'll know that it's been precision-ed to death. So, a clock it is. Wooden because metalwork is a little
 beyond me right now and besides, look at this thing. It's gorgeous. This particular one is done by an immensely talented woodworker named Wayne Sutter.
This is gorgeous, and it's not even finished in this shot. Go buy a clock from him - we need more craftspeople like this.

 Clocks, especially mechanical ones, are amazing and complex works of careful engineering. Sounds like a
 great amateur project, doesn't it?

Image from Wikimedia Commons. Yay public domain!


 Clocks from the inside out
 Initial impression: Holy crap, there's a lot of vocab here. Right off, we have: mainspring, arbor, going
 barrel, ratchet, pawl, pinion, wheel train, escapement, remontoire, and balance wheel, just to name a few.

From a mechanical perspective, I think that the easiest way to tackle a watch movement (the whole thing in the back of a clock or watch that makes the thing go) is to trace the energy. Energy goes into the watch when you wind it, and out of it as the stored energy is expended in making the hands turn and the escapement oscillate (and the alarm go, and the cuckoo bird cuckoo, etc.). When you wind a watch, you spin a post, or turn a key that turns a post, called an arbor. The arbor connects to a spiraling strip of metal called the mainspring.
The mainspring.
Image from Wikimedia Commons.

 The mainspring is attached to the arbor from the inside of the spiral, making the whole thing look a little like a spinning top, or maybe a barred galaxy if you're creative. 

The arbor/spindle/massive beams of radiation would be coming out of the center of that.


The other end end of the mainspring attaches to a short, fat cylinder called the going barrel.

Also Wikimedia.
The barrel is free to spin, which is a good thing, because the barrel cylinder is capped with what is essentially a solid gear. This gear is used to interact with the gear train, which is the bit that makes the hands and other useful parts move. Its most important function, though is to power the balance, the little wheel that does for a wristwatch what a pendulum does for a grandfather clock.  

A real-life example: the going barrel in this watch is capped by the gear you can see in this picture. It also happens to be upside down.

Suppose you got bored at this point and thought, what the hell, we've got a power source and something that spins - let's just put some hands on it and let 'er rip! You'd have a timekeeping device of some sort, but right now there's nothing to counteract the force of that spring - you'd wind it, let it go, and it would release all its energy all at once. You'd measure time in spring-unwindings instead of seconds. 

That's where rest of the gear train comes in. That'll have to wait for part two, though. In the meantime, here's some watch porn for all you horologists out there. 

...that even sounds dirty.