For sawtooth waveform generation, the output of the above mentioned integrator should come to zero at saturation level i.e. voltage across capacitor is zero. This can be done by putting a short circuit across capacitor; but if we short directly, capacitor is not going to charge initially. So connect a transistor (as a switch) across capacitor ‘C’ as shown in figure below.
Normally the transistor is in cut-off region to be charged. When capacitor is charged upto required saturation level apply a positive pulse at the base of the transistor so that it goes into the saturation
In saturation VCE = 0, so capacitor shorted and discharges quickly to zero as shown in waveforms below.
These waveform generators are available in IC form called function generator. These circuits are designed to provide basic waveforms with minimum number of external components. A heart of such function generator is VCO that generates triangular and square waves.