The graph of a sinusoidal function has a minimum point at (0, 2) and then has a maximum point at (3pi,6).
Write the formula of the function, where is entered in radians.