I've already got a gear that has its teets as in the picture: I want to create the mechanism from the picture, but it's harder than I expected. I think my gear is not the problem. But I'm not able to create the gray part, the gear anchor. Is there any way to calculate the shape and/or sizes that matter for the anchor? I tried a lot of things but I can't find the ideal shape for the anchor points that hook between the teeths of the gear.
The mechanism is called an "escapement", and part of its function is that the gear imparts energy to the swinging teeth in order to keep the pendulum (or whatever) moving in spite of any frictional losses it might have.
Note that in your diagram, the gear teeth impinge on a curved surface on each of the swinging teeth. Note also that as a result, the swinging teeth are not symmetrical. Instead, each one has its curved surface in a particular angular relationship to the radius of the gear at that point. It is this curve that allows the rotating gear to give the swinging mechanism a "push" on each stroke.
Is this enough of a hint to get you going in the right direction? (pun intended! :-)