I want some scalar spline function defined on regular 2D grid $F(x,y)$ with continuous first derivative which is easy to intersect with arbitrary ray/line ${\vec l}(t) = (c_x t,c_y t,c_z t)$.
Finding the intersection means finding roots of equation $f_{c_x,c_y}(t)-c_zt=0$ where $f_{c_x,c_y}(t)=F(c_x t, c_y t )$ are values of the spline along the line ${\vec l}(t)$.
Since it is easy to find roots of quadratic polynominal I want $f_{c_x,c_y}(t)$ to be piecewise quadratic polynominal for any ${c_x,c_y}$.
What is the problem / what is not a solution:
- consider bi-quadratic B-spline on rectangular grid created by tensor-product of 1D quadratic B-splines. The result is bi-quadratic which means it is $f_{c_x,c_y}(t)$ is 4-th order polynominal.
- function composed of Quadratic Bezier-triangles. While it is certainly just quadratic function along any direction, it is hard ensure continuous derivatives at the boundary between triangles.