Share JSXGraph: example "Fermat's spiral"

JSXGraph
Share JSXGraph: example "Fermat's spiral"
This website is a beta version. The official release will be in **2023**.

Fermat's spiral

Fermat's spiral can be described in polar coordinates $(r, \theta)$ by the equation $$r = \pm a\theta^{1/2}\,$$ with $a$ being a real number.
// Define the id of your board in BOARDID

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-10, 10, 10, -10]
});

var a = board.create('slider', [[1, 9], [5, 9], [0, 1, 4]], {name: 'a'});

var c1 = board.create('curve', [
    (phi) => a.Value() * Math.sqrt(phi),
    [0, 0], 0, 8 * Math.PI
], {curveType: 'polar', strokewidth: 4});

var c2 = board.create('curve', [
    (phi) => -a.Value() * Math.sqrt(phi),
    [0, 0], 0, 8 * Math.PI
], {curveType: 'polar', strokewidth: 4});