<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scale_to_vol(self, vol):
 """Scale ball to encompass a target volume."""


        f = (vol / self.vol_ball) ** (1.0 / self.n)  # linear factor
        self.expand *= f
        self.radius *= f
        self.vol_ball = vol