Principles of electroplating and electroforming