xxxxxxxxxx
30
function setup() {
createCanvas(400, 400);
background(220);
scene = new Scene();
reel();
}
function draw() {
background(220);
}
function reel() {
// grp1 = create2DPolarGraph(
// (t) => 20 * (2 + Math.cos(10 * t ) + 2*Math.sin(5 * t)),
// [0, 2 * Math.PI]
// );
grp1 = create2DPolarGraph(
(t) =>
15 *
(Math.pow(Math.E, Math.cos(t)) -
2 * Math.cos(4 * t) -
Math.pow(Math.sin(t / 12), 5)),
[0, 12 * Math.PI]
);
grp1.plot();
grp1.size(400, 400);
grp1.position(50, 50);
grp1.play();
}