4.1 KiB
stuff i've plotted in desmos
in some order idk
circumcircle
drag around the three points to see how their circumcircle is affected. sorry, i never finished simplifying the math here.
parabola arc length
not closed form, sorry. drag the points around like it's a jumprope.
"diode"
i didn't name this function; i have no idea if or how it relates to a diode. the red line (the line of interest) is actually just the 12th order smoothstep.
btw, you can find smoothstep coefficients for any order by the triangular table of this integer sequence: OEIS A091811
punching it into wolfram (try changing n)
smoothstep alternatives
refer to shadertoy:
tanh approximation
approximating tanh by taking its continued fraction form and (externally) optimizing the constants. probably not useful.
TanhTest lolremez approx
a polynomial approximation of a scaled tanh function made with the excellent lolremez.
e^(-2/x) approximations
i forget where i read about this but basically you can
approximate e^(-2/x)
by (x-1)/(x+1)
when x is large.
the black line shows the absolute error.
compressor gain
trying to design a cheap-to-compute gain curve for a dynamic range compressor. this thing uses just one division. iirc it didn't wind up being all that useful.
both axes are in power decibels. note that it acts as a gate under -70 dB.
compressor approx stuff
trying to compute abs(x) by polynomials, or something. weird stuff.
doom turnspeeds
i used this to help design turnspeed smoothing in my zdoom patch.
note to self: i think i have a more recent version of that patch lying around somewhere.
Biweight Funtimes
messing around with a variations of Tukey's Biweight? i think the only reason i kept this around was 'cause it's fun to watch animated.
sincmod
something something windowing functions i dunno.
SGDR
simple case of a SGDR curve. i just kept this around 'cause the logarithmic plot complements the linear plot in a kinda cool way.
sqr/abs generalization
self-explanitory.
SELU
GELU
GELU activation alongside an approximation i lifted off reddit or someplace.
erf cdf approximations
approximate gaussian stuff, with inversions and integrals.
squish
possibly useful functions for squishing values. mostly based on sigmoidal functions.
sin LUT approx 2
approximating a quadrant of sin(x) with a polynomial and a LUT.
circle calculus
some fun curves relating to unit circles.
archimedes spiral
it's just Archimedes' Spiral, plus some related functions.