Battery charger general guides
You're probably going to need a microcontroller to monitor and control the charging. NiMH and NiCd batteries require careful monitoring of the current, voltage, and maybe temperature too. This will be difficult to do with just resistors and diodes. These links say more:

http://www.powerstream.com/NiMH.htm
http://batteryuniversity.com/learn/article/charging_nickel_based_batteries