gebrStrahl

Startpunkt;Auftreffpunkt,Lotrichtung dichtes Medium,Brechindex

uu: u / Length[u]
v = Vector(A, B)
vu: v / Length[v]
cosα: abs(uu * vu)
sinα: sqrt(1 - cosα^(2))
sinβ: sinα / n^(sgn(uu * vu))
cosβ: sqrt(1 - sinβ^(2))
faka: sinβ / (cosβ * sqrt((1 + cosα) / 2) + sinβ * sqrt((1 - cosα) / 2))
fakb: (sinα * cosβ - cosα * sinβ) / (cosβ * sqrt((1 + cosα) / 2) + sinβ * sqrt((1 - cosα) / 2))
l: fakb * sgn(uu * vu) * uu + faka * vu
b = Ray(B, l)