Rotate based on surface?

I only understood this so far:

Curious where this goes…