Catenary Activation Curve
A visual companion to the "catenary as a neural-network activation function"
idea: two draggable points A and B define the endpoints of a hanging-chain
(catenary) curve. The curve is clamped flat outside [x1, x2] and blended
into those plateaus with a cubic Hermite ease, so the whole thing behaves
like a smooth, sag-tunable activation function rather than an open-ended arc.
Controls: drag move point A or B (the curve's endpoints) scroll (away from a point) adjust the chain length / sag amount scroll (over a point) resizes that point's handle, ignore it
The catenary math (solveCatenary / catenaryOutput / catenaryDerivative) and
the Hermite tip-smoothing formulas are ported near-verbatim from the
catenary.ts activation-function experiment - see the session notes for the
closed-form derivation. Canvas y grows downward, so points are solved in a
y-flipped "math space" and flipped back for drawing - this makes the chain
sag down on screen like a real rope, rather than arching upward.
Meta Data
| title | Catenary Activation Curve |
| imports | () |
| files | ('head', 'stroke', 'pointlist', 'point', 'mouse', 'dragging', 'stage') |
| unused_keys | () |
| unknown_keys | ('categories',) |
| categories | ['', 'curve', 'catenary', 'activation', 'neural-network'] |
| filepath_exists | True |
| path | claude-sonnet-5-catenary-activation-example |
| filepath | claude-sonnet-5-catenary-activation-example.js |
| clean_files | ('../point_src/core/head.js', '../point_src/setunset.js', '../point_src/stroke.js', '../point_src/pointlistdraw.js', '../point_src/pointlistgradient.js', '../point_src/pointlistshape.js', '../point_src/pointlistgenerator.js', '../point_src/unpack.js', '../point_src/pointlist.js', '../point_src/pointlistpen.js', '../point_src/pointpen.js', '../point_src/compass.js', '../point_src/center.js', '../point_src/point-content.js', '../point_src/pointdraw.js', '../point_src/relative-xy.js', '../point_src/pointcast.js', '../point_src/point.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/stage-hooks.js', '../point_src/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js') |