( ( ( The speed ) ( of ( the ( light ray ) ) ) ) ( ( changes ( upon ( changing mediums ) ) ) . ) )
(ROOT (S (NP (NP (DT The) (NN speed)) (PP (IN of) (NP (DT the) (JJ light) (NN ray)))) (VP (VBZ changes) (PP (IN upon) (NP (VBG changing) (NNS mediums)))) (. .)))
The speed of the light ray changes upon changing mediums.
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (NN light)) (VP (VBZ passes) (PP (IN from) (NP (CD one) (NN medium))) (PP (TO to) (NP (DT another)))))) (, ,) (NP (PRP it)) (VP (VBZ changes) (NP (NN speed))) (. .)))