Calculating glowing/reflecting/refracting lines for educational purposes