How capacitors form electric fields