Handy Graphs This is an interactive re-creation of a graphic I saw on Twitter via Matt Sephton’s retweet of @_phocom . The image is meant to be a useful reference for math functions that are useful in graphics programming and game development. I thought the graphic was cool, and I had been testing the Function Plot Javascript library, so I made this as a fun exercise.
The graphs are interactive, pan them or zoom with scroll wheel.
abs(x) −4 −3 −2 −1 0 1 2 3 4 0 0.5 1 1.5 2 2.5 3 3.5 4 acos(x) −4 −3 −2 −1 0 1 2 3 4 0 0.5 1 1.5 2 2.5 3 3.5 acosh(x) −4 −3 −2 −1 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 airy(x) −4 −3 −2 −1 0 1 2 3 4 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 asin(x) −4 −3 −2 −1 0 1 2 3 4 -1.5 −1 -0.5 0 0.5 1 1.5 asinh(x) −4 −3 −2 −1 0 1 2 3 4 -2.5 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 2.5 atan(x) −4 −3 −2 −1 0 1 2 3 4 -1.5 −1 -0.5 0 0.5 1 1.5 atanh(x) −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 cdawson(x) −4 −3 −2 −1 0 1 2 3 4 -1.2 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 ceil(x) −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 cerf(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 cos(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 cosh(x) −4 −3 −2 −1 0 1 2 3 4 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 erf(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 erfc(x) −4 −3 −2 −1 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 exp(x) −4 −3 −2 −1 0 1 2 3 4 0 5 10 15 20 25 30 35 40 45 50 55 60 floor(x) −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 imag(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 int(x) −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 inverf(x) −4 −3 −2 −1 0 1 2 3 4 -2.5 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 2.5 invnorm(x) −4 −3 −2 −1 0 1 2 3 4 −3 -2.5 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 2.5 3 lambertw(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 lgamma(x) −4 −3 −2 −1 0 1 2 3 4 −2 −1 0 1 2 3 4 5 6 log(x) −4 −3 −2 −1 0 1 2 3 4 −6 −5 −4 −3 −2 −1 0 1 2 log10(x) −4 −3 −2 −1 0 1 2 3 4 -2.5 −2 -1.5 −1 -0.5 0 0.5 1 real(x) −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 sgr(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 sin(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 sinh(x) −4 −3 −2 −1 0 1 2 3 4 −30 −25 −20 −15 −10 −5 0 5 10 15 20 25 30 sqrt(x) −4 −3 −2 −1 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 tanh(x) −4 −3 −2 −1 0 1 2 3 4 −1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 besj0(x) −4 −3 −2 −1 0 1 2 3 4 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 besj1(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 besy0(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 EllipticK(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 EllipticE(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 besy1(x) −4 −3 −2 −1 0 1 2 3 4 −2 -1.5 −1 -0.5 0 0.5 1 1.5 2 erfi(x) −4 −3 −2 −1 0 1 2 3 4 −20 −15 −10 −5 0 5 10 15 20 gamma(x) −4 −3 −2 −1 0 1 2 3 4 −20 −15 −10 −5 0 5 10 15 20 tan(x) −4 −3 −2 −1 0 1 2 3 4 −20 −15 −10 −5 0 5 10 15 20 Some graphs are left blank because I wasn’t able to easily find an
implementation of the function in JavaScript. Let me know
on Twitter if you have one.