In the figure we have the configuration of a variable voltage regulator with two transistors and a zener diode. The transistor mainly, depending on the output current, must be equipped with a heat sink. The components are calculated according to the characteristics of the transistors and the output voltage.