Skip to content

Instantly share code, notes, and snippets.

@onetdev
Last active September 23, 2021 19:01
Show Gist options
  • Save onetdev/0a67a022ebfa3cb7054de60b3a6d6801 to your computer and use it in GitHub Desktop.
Save onetdev/0a67a022ebfa3cb7054de60b3a6d6801 to your computer and use it in GitHub Desktop.
fancy curves for lavalamp
// 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