Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
A sigmoidal interpolating rational function
ResourceFunction["RationalSmoothStep"][x] gives a rational sigmoidal function between [0,1] for a position x in [0,1]. | |
ResourceFunction["RationalSmoothStep"][n,x] is the rational smoothstep function of order n at position x. |
Interpolate at a position on a step:
In[1]:= |
Out[1]= |
Show rational 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]= |
RationalSmoothStep threads over lists:
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
Use RationalSmoothStep to implement a "smooth" version of Hue (reference):
In[7]:= |
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
RationalSmoothStep satisfies a symmetry relation:
In[10]:= |
Out[10]= |
Use RationalSmoothStep to demonstrate "ease-in/ease-out":
In[11]:= |
Out[11]= |
This work is licensed under a Creative Commons Attribution 4.0 International License