Slime schrieb:
>>This worked nicely, thank you. A small tweak in the accuracy and
>>max_gradient and I have this.
>
>
> Nice. You might even want to use this version:
>
> #local smoothfunc = function(x) {x*x*x*(10+x*(6*x-15))}
>
> Which also matches second derivatives, and will make the transition from
> straight to curved even more invisible.
>
Nice, how did you calculate it?
Once I made some differential equations
for this problem and solved them.
It was a bit dirty and some paper sheets got lost.
If I remember right the differential equations
for a smooth transition from 0 to 1 were:
f(0) = 0
f(1) = 1
df(0)/dx = 0 # match in first derivative
df(1)/dx = 0
d^2f(0)/dx = 0 # match in second derivative
d^2f(1)/dx = 0
An approximation method aka Taylor or
something which could be used to get a match
in even higher derivatives would be nicer
but when I got f(x) for the second derivative
I forgot thinking about it further.
Sebastian
Post a reply to this message
|