The following applet simulate a rectifier circuit.
The moving dots simulate the drift motion of election in the circuit. Added a capacitor to filter out the ripple