The purpose of this addendum is to prove that equation (12) in [1] is correct for an arbitrary surface.
Equation (9) states that for a ray that intersects a surface at
t
, the new ray is given by:
P' = P + t D
D' = D
dP'/dx = dP/dx + t dD/dx + dt/dx D
dD'/dx = dD/dx
dt/dx
is derived for a plane in
(12), and it is stated without proof that the expression is valid for all
surfaces. Here, we give a simple proof of this fact.
Suppose we have a surface S
that is parameterized by
surface coordinates u
and v
:
S(u,v)
It's unit surface normal N
is given by the normalized
cross product of its two partial derivatives:
n = (dS/du) x (dS/dv)
N = n / ||n||
P
and D
is given by the system of equations:
S = P + t D
x
, we get:
dS/dx = dP/dx + t dD/dx + dt/dx D
dt/dx
(which is what we are solving for)
and dS/dx
. A novel application of the surface normal
will get rid of this dS/dx
term. Now, the Chain Rule
for multivariate functions tells us that dS/dx
is a
surface tangent vector given by a linear combination of the two basis
tangent vectors dS/du
and dS/dv
:
dS/dx = dS/du du/dx + dS/dv dv/dx
du/dx
and dv/dx
tell us the rate of change
in the local surface parameterizations u
and v
with respect to the image space coordinate x
, but as we shall
see, these values are irrelevant. The dot product of the surface tangent
vector dS/dx
with the surface normal
N
is of course zero:
(dS/dx . N) = (dS/du du/dx + dS/dv dv/dx) . N
(dS/dx . N) = (dS/du . N) du/dx + (dS/dv . N) dv/dx
(dS/dx . N) = (0) du/dx + (0) dv/dx
(dS/dx . N) = 0
dS/dx = dP/dx + t dD/dx + dt/dx D
N
to get:
0 = (dP/dx + t dD/dx + dt/dx D) . N
dt/dx = - [ (dP/dx + t dD/dx) . N ] / (D . N)