DEV Community

Peter Teoh
Peter Teoh

Posted on

Mathematical art from Vortex parametric equation

With some inspiration from Pinterest (I lossed the original link already) I implemented this Javascript that draw the following parametric curves. And to my surprise, every single one values of the parameters (aaaa,bbbb,cccc) generate a different design:

function x(t) {
return Math.cos(t)+1/3*(Math.cos(aaaa*t)+Math.sin(bbbb*t));
}
function y(t) {
return Math.sin(t)+1/3*(Math.sin(aaaa*t)+Math.cos((bbbb-cccc)*t));
}

Enter fullscreen mode Exit fullscreen mode

https://tthtlc.github.io/vortex_explore.html

and here are the different design:

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Top comments (0)