Refraction script idea

 From:  Fubax
10709.1 
I have an idea for a script than could generate refracted rays. It would be useful for generating lens schematic.



Idea is that it would work like Extend function, but creating new line segment as follows:
• Select line to refract
• Select transition line or surface
• Type transition refraction index (eg. air to glass 1/1.52)
Result would be a new line segment at a refracted angle.

Here's how refraction line is constructed manually, without any trigonometry. Just scaling perpendicular to normal, then mirroring.