Last active
September 23, 2021 19:01
-
-
Save onetdev/0a67a022ebfa3cb7054de60b3a6d6801 to your computer and use it in GitHub Desktop.
fancy curves for lavalamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://onetdev.medium.com/ | |
const frequencyCurve = (x: number): number => { | |
return Math.sqrt(2 * Math.PI * Math.exp(-1 * (x*x) /2 )); | |
} | |
const halfCircle = (x: number): number => { | |
return Math.sin(Math.acos(x)); | |
} | |
const parabola = (x: number): number => { | |
return x * x; | |
} | |
const hyperbola = (x: number): number => { | |
return 1 / x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment