aberrate function
Relativistic aberration: direction u as seen by an observer moving
with velocity v (in units of c).
u′ = [u/γ + (1 + u·v/(1 + 1/γ))·v] / (1 + u·v), 1/γ = √(1 − v²).
Implementation
Vector3 aberrate(Vector3 u, Vector3 v) {
final inverseGamma = math.sqrt(1 - v.dot(v));
final uv = u.dot(v);
return ((u * inverseGamma + v * (1 + uv / (1 + inverseGamma))) *
(1 / (1 + uv)))
.unit;
}