Visualizing and manipulating the spatial and temporal coherence of light with an adjustable light source in an undergraduate experiment