function of variable resistor in physics