This interesting project dated back to around 2002, when I was in my Technology High School of Development, Yogyakarta. Thanks to Pak Edy Rahardjo, who press us the students to be creative. He was very best & inspiring in this way :)
The Mechanical Traffic Light works by contacting "blue pyramidal contact" (or any contact shape will actually work) to each selector switch wheel. Each wheel represent number of road in the junction. It is only 3 roads in above draft. Each contact colour in the wheel represent the lamp to be switched ON. The portion of the switch can be simply calculated as:
Green+Yellow = (360 degree)/n ;where n is number of roads in the junction
Red = 360 degree - (Green+Yellow).
Rotation per draft above is CW. You can see the "red" light will glow sequentially.
Interesting logic, isn't it? :D