Graphics Reference
In-Depth Information
Occasionally we will take the gradient of a vector-valued function, which
results in a matrix (sometimes called the Jacobian ). For example, in three
dimensions,
∂f
∂x
∂f
∂y
∂f
∂z
∂g
∂x
∂g
∂y
∂g
∂z
f =
( f, g, h )=
.
∂h
∂x
∂h
∂y
∂h
∂z
Note that each row is the gradient of one component of the function. One
way to remember that it's the rows and not the columns is that it should
work with the approximation
f ( x x )
f ( x )+
f ( x x.
The matrix-vector product is just computing the dot-product of each row
of the matrix with the vector, and so each row should be a gradient of the
function:
∇f
∇g
.
( f, g, h )=
h
An alternative notation for the gradient that is sometimes used is
∂f
∂x .
f =
Using a vector in the denominator of the partial derivative indicates we're
taking derivatives with respect to each component of x .
A.1.2 Divergence
The divergence operator only is applied to vector fields and measures how
much the vectors are converging or diverging at any point. In two dimen-
sions it is
( u, v )= ∂u
∂x + ∂v
∇·
u =
∇·
∂y ,
and in three dimensions,
( u, v, w )= ∂u
∂x + ∂v
∂y + ∂w
∇·
u =
∇·
∂z .
Note that the input is a vector and the output is a scalar.
Search WWH ::




Custom Search