Graphics Reference
In-Depth Information
then you can see that you have four values that you can use to compute the
four unknown coefficients for the noise function. We can put these values into
a system of four equations in the four unknowns, and we get
N
N
G
G
1000
1111
0100
0123
A
B
C
D
0
1
=
.
0
1
We can invert this matrix and get an exact matrix expression for A , B , C , and D :
A
B
C
D
1000
0010
33 21
2211
N
N
G
G
0
1
=
.
0
1
This will give us the values of the coefficients in terms of the positions
and gradients. To simplify this, we gather the coefficients and get an expres-
sion like this:
() =
Nt BN BN BG BG
N
00 11 00 11 .
+
+
+
N
G
G
When we do this, the coefficients are
2
3
B
=− +
=−=−
=− +
=− +
13 2
321
2
t
t
,
N
0
Bt
2
t
3
B
,
N
1
N
0
2
3
Bt
t
t
,
G
0
Bt
2
t
3
.
G
1
Some value-only noise functions choose to set the gradients to zero at
each of the noise points, but this is highly arbitrary. A beter approach is to
choose the gradients intelligently, based on the positions of the surrounding
points. A good way to do this is with the gradients that one would use for
a Catmull-Rom spline [8]. Because the noise points are all unit-spaced, the
Catmull-Rom gradient simplifies to
1
2
(
)
GNN
i
=
.
i
+
1
i
1
Search WWH ::




Custom Search