The maximum case temperature, ambient air temperature, and power dissipation of the resistor are used to find the required thermal resistance of the heatsink.