51 |
|
|
52 |
|
rand(x) - pseudo-random function (0 to 1) |
53 |
|
|
54 |
– |
hermite(p0,p1,r0,r1,t) - 1-dimensional hermite polynomial |
55 |
– |
|
54 |
|
noise3(x,y,z), noise3x(x,y,z), |
55 |
|
noise3y(x,y,z), noise3z(x,y,z) - noise function with gradient (-1 to 1) |
56 |
|
|
120 |
|
|
121 |
|
fade(near_val,far_val,dist) : far_val + |
122 |
|
if (16-dist, (near_val-far_val)/(1+dist*dist), 0); |
123 |
+ |
|
124 |
+ |
hermite(p0,p1,r0,r1,t) : p0 * ((2*t-3)*t*t+1) + |
125 |
+ |
p1 * (-2*t+3)*t*t + |
126 |
+ |
r0 * (((t-2)*t+1)*t) + |
127 |
+ |
r1 * ((t-1)*t*t); |
128 |
|
|
129 |
|
bezier(p1, p2, p3, p4, t) : p1 * (1+t*(-3+t*(3-t))) + |
130 |
|
p2 * 3*t*(1+t*(-2+t)) + |