|
![](/i/fill.gif) |
> Nice, how did you calculate it?
Actually, I just took it from my old Slime-POV source code which implemented
second-derivative continuity in f_noise3d; so ultimately it came from Ken
Perlin's paper which explained how to do that. Of course, it can be figured
out manually with the conditions you describe. Since there are 6
restrictions on the function, we must have 6 unknowns, which mean it's a 5th
order equation:
f(x) = ax^5 + bx^4 + cx^3 + dx^2 + ex + f
Differentiating twice, plugging in x = 0 or 1 and setting the results equal
to zero or one as you stated should produce a 6x6 matrix which can be solved
for a,b,c,d,e,f. The result will be a=6, b=-15, c=10, d=e=f=0. Then the
result is equivalent to x*x*x*(10+x*(6*x-15)).
Nice image, the smoothness really helps.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |