speice.io/blog/2024-11-15-playing-with-fire/src/popcorn.ts

10 lines
267 B
TypeScript

// hidden-start
import {Coefs} from './coefs'
import {Variation} from './variations'
// hidden-end
export function popcorn({c, f}: Coefs): Variation {
return (x, y) => [
x + c * Math.sin(Math.tan(3 * y)),
y + f * Math.sin(Math.tan(3 * x))
];
}