C.a.R. > Applications > Physics > Looney Gears
This is a rather complicated gear mechanism. To find the exact position of the center gear is easy, if not impossible. So the construction computes the positions of the green gears from the center gear, and aligns them such that they fit into the outside gear. The blue gear is aligned to fit in one of the green gears. Then guessing and moving around fits it into the other gears.
The gears are generated with a macro of course, depending on the circle and the number of dents. However, the macro needs to be executed as often as necessary by hand, since there is no automatic loop in C.a.R.