Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
A generalized sigmoidal interpolating polynomial
ResourceFunction["GeneralizedSmoothStep"][n,x] is the generalized smoothstep function of order n at position x. |
Interpolate at a position on a step:
In[1]:= | ![]() |
Out[1]= | ![]() |
Show the smooth steps for multiple orders:
In[2]:= | ![]() |
Out[2]= | ![]() |
Evaluate at an exact position:
In[3]:= | ![]() |
Out[3]= | ![]() |
At a numeric position:
In[4]:= | ![]() |
Out[4]= | ![]() |
GeneralizedSmoothStep threads over lists:
In[5]:= | ![]() |
Out[5]= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Successive derivatives of GeneralizedSmoothStep can be expressed in terms of Piecewise:
In[7]:= | ![]() |
Out[7]= | ![]() |
Plot successive derivatives:
In[8]:= | ![]() |
Out[8]= | ![]() |
Use GeneralizedSmoothStep to implement a "smooth" version of Hue (reference):
In[9]:= | ![]() |
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
GeneralizedSmoothStep is continuous from the left at x=0:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
GeneralizedSmoothStep is continuous from the right at x=1:
In[15]:= | ![]() |
Out[15]= | ![]() |
In[16]:= | ![]() |
Out[16]= | ![]() |
In[17]:= | ![]() |
Out[17]= | ![]() |
GeneralizedSmoothStep[0,x] is equivalent to Clip:
In[18]:= | ![]() |
Out[18]= | ![]() |
GeneralizedSmoothStep[1,x] is equivalent to the resource function SmoothStep:
In[19]:= | ![]() |
Out[19]= | ![]() |
GeneralizedSmoothStep[2,x] is equivalent to the resource function SmootherStep:
In[20]:= | ![]() |
Out[20]= | ![]() |
GeneralizedSmoothStep can be expressed in terms of InterpolatingPolynomial and Clip:
In[21]:= | ![]() |
In[22]:= | ![]() |
Out[22]= | ![]() |
GeneralizedSmoothStep can be expressed in terms of BetaRegularized and Clip:
In[23]:= | ![]() |
In[24]:= | ![]() |
Out[24]= | ![]() |
GeneralizedSmoothStep is undefined for nonpositive integer orders:
In[25]:= | ![]() |
Out[25]= | ![]() |
GeneralizedSmoothStep is undefined for complex arguments:
In[26]:= | ![]() |
Out[26]= | ![]() |
GeneralizedSmoothStep[n,x] is (n+1)th-order discontinuous at x=0 and x=1:
In[27]:= | ![]() |
Out[27]= | ![]() |
Use GeneralizedSmoothStep to demonstrate "ease-in / ease-out":
In[28]:= | ![]() |
Out[28]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License