Skip to content

Instantly share code, notes, and snippets.

@Toshakins
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Toshakins/b10550bf90d4dc0df586 to your computer and use it in GitHub Desktop.
Save Toshakins/b10550bf90d4dc0df586 to your computer and use it in GitHub Desktop.
substack
return function (t) {
return (70*base() + sin(0.5 * t % 0.2)*60) / 40 + sin(300) * 10
function tan(x) {
return Math.tan(Math.PI * t * x);
}
function sin(x) {
return Math.sin(Math.PI * t * x);
}
function cos(x) {
return Math.cos(Math.PI * t * x);
}
function ctg(x) {
return 1/tan(x);
}
function base() {
MAGIC_SYNCHRONISATION_CONSTANT = 3.98
return cos(460) + cos(464) +
sin(460/3) +
tan(4)*1/sin((t % MAGIC_SYNCHRONISATION_CONSTANT < 2) ? 1 : 2);
}
function beeper() {
// Second summand is something kind of cycloid
return (Math.pow(12400, t % 0.5) + 4*(t % 1 - sin(t % 1)))
}
}
return function (t) {
return sin(370/16)/64 + sin(370/8)/8 + sin(370/4)/3 + sin(370/2)/5 + sin(370)
function tan(x) {
return Math.tan(Math.PI * t * x);
}
function sin(x) {
return Math.sin(Math.PI * t * x);
}
function cos(x) {
return Math.cos(Math.PI * t * x);
}
function ctg(x) {
return 1/tan(x);
}
function base() {
MAGIC_SYNCHRONISATION_CONSTANT = 3.98
return cos(460) + cos(464) +
sin(460/3) +
tan(4)*1/sin((t % MAGIC_SYNCHRONISATION_CONSTANT < 2) ? 1 : 2);
}
function beeper() {
// Second summand is something kind of cycloid
return (Math.pow(12400, t % 0.5) + 4*(t % 1 - sin(t % 1)))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment