The ‘superellipse’ function there is ‘the actual code’ that handles the math, and the cell with the drawing has ‘the actual code’ that handles the drawing. It uses DOM.svg which is part of the Observable standard library, but you could make your own svg element some other way (e.g. by putting it in your html).

If you want to use sliders to adjust a, b, and n, you need to make input elements on your page, and then write your own code to hook up the sliders to trigger re-drawing and set the relevant parameters. Observable makes this nicer by handling the reactivity in a convenient way.

For a fixed value of a, b, and n, you could just set those directly in your code (and also w, h, for the width and height of the plot).

If you just want one function outputting points on the superellipse when you pass in a, b, n, and a parameter t in [0, 1], here is a single-function version cut down to just that:

```
function superellipse(a, b, n, t) {
t = 2 * Math.PI * t;
const x = Math.cos(t), y = Math.sin(t),
sx = Math.sign(x), sy = Math.sign(y);
return [a*sx * (x*sx)**(2/n),
b*sy * (y*sy)**(2/n)];
}
```