The Japanese have some wonderful programming along these lines. For preschoolers there is PythagoraSwitch (ピタゴラスイッチ) [1] which features amazing Rube Goldberg machines, geometric reasoning, algorithmic thinking, etc. Sadly, NHK loves to keep their programmes under lock and key, so I could not find anything to share other than the name.