( ( ( Light waves ) ( bend ( when ( ( ( passing diagonally ) ( from ( ( one material ) ( to another ) ) ) ) ( because ( ( ( the speed ) ( of light ) ) ( ( changes slightly ) ( according ( to ( ( the density ) ( of ( the material ) ) ) ) ) ) ) ) ) ) ) ) ( it ( ( is traversing ) . ) ) )
(ROOT (S (S (NP (JJ Light) (NNS waves)) (VP (VB bend) (SBAR (WHADVP (WRB when)) (S (VP (VBG passing) (ADVP (RB diagonally)) (PP (IN from) (NP (NP (CD one) (NN material)) (PP (TO to) (NP (DT another))))) (SBAR (IN because) (S (NP (NP (DT the) (NN speed)) (PP (IN of) (NP (NN light)))) (VP (VBZ changes) (ADVP (RB slightly)) (PP (VBG according) (PP (TO to) (NP (NP (DT the) (NN density)) (PP (IN of) (NP (DT the) (NN material)))))))))))))) (NP (PRP it)) (VP (VBZ is) (VP (VBG traversing))) (. .)))
Light waves bend when passing diagonally from one material to another because the speed of light changes slightly according to the density of the material it is traversing.
(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))) (. .)))