md`\`trend\` is \`|x()|\` to the power of \`pinchiness\`, an input. If we want to simplify the geometry, we can set it to 1, which makes straight diagonal lines, or 0 which results in a straight horizontal line (but in that case the result is like a football or a disk rather than a heart shape). ***Pinchiness: ${Inputs.bind(Tangle({min:0,max:2,step:0.05}), viewof pinchiness_in)}***`

Now let’s look at the components of the term that is added to trend; recall that these are multipled together (they are factors):

md`\`semi_circle\` is a path that is 0 except along a semi-circle of the \`radius_in\` given as an input.`

Code

md`We want points to spread far from the 'spine' in the middle of the heart along the x axis and to remain closer to (or on) the spine closer to the edges: *a semi-circle factor has this effect*. ***Radius: ${Inputs.bind(Tangle({min:0,max:10,step:0.05}), viewof radius_in)}***\`tallness\` is a constant input that scales the 'spread' about the spine. ***Tallness: ${Inputs.bind(Tangle({min:0,max:2,step:0.05}), viewof tallness_in)}***`

Code

md`\`wave\` is a sine wave with a frequency according to the waviness input. ***Waviness: ${Inputs.bind(Tangle({min:0,max:10,step:0.05}), viewof waviness_in)}***`

It’s value moves smoothly between -1 and 1 (inclusive); this adds noise that makes the points scatter across the shape of the heart.

To make it easier to visualise how this works, we can remove the noise.

In the following wave is no longer a sine wave: it’s a constant -1 or +1 representing the limits of the sine wave. I’m also showing 0 so we can see that the result is =trend in this case:

md`Moving back to the sine wave once again, visualizing \`heart\` as a (faint!) line chart results in: ***[Waviness: ${Inputs.bind(Tangle({min:0,max:10,step:0.05}), viewof waviness_in)}]***`