Hacker News new | ask | show | jobs
by ycombobreaker 4862 days ago
The reason smoothstep looks similar to a sinusoid is because it is a polynomial approximation. I remember Dan Perlin discussing it in his (book|paper|website), but googling around doesn't seem to show anything that I remember. For Perlin Noise, a sinusoid was the highest-quality interpolation because it was continuous everywhere, even at the endpoints. Smooth-step is discontinuous at the endpoints, but it is close enough for discrete computer graphics.
3 comments

Do you mean "smooth everywhere"? The Weierstrauss function is continuous everywhere, but you wouldn't use it for interpolation:

http://en.wikipedia.org/wiki/Weierstrass_function

Yes, thank you. After reading a bit more, smoothness is what I'm looking for. One of the _derivatives_ of the smoothstep is discontinuous at the endpoint.
I wouldn't call smoothstep an approximation to a sinusoid - both are sigmoidal, but that's about it. This smoothstep in particular is just a natural cubic spline interpolator, arguably the simplest sigmoidal interpolating function.
Minor correction: Ken Perlin - http://mrl.nyu.edu/~perlin/
Thank you!