updated 1d capacitor example