How to create a beam whose Diameter depends on its curves radii?

Thanks for your help again! Thats very interesting but I think theres still a mistake somewhere.
I tried your programming with a new curve. Unfortunatelly it does not what it should do. The result does not make the beam thicker on the straight parts of the curve or does not make the beam thinner on the strong curved parts of the curve.
I load up a handdrawing of the result, how it approximately should look like.

Also I don´t understand why there´s a little narrowing in the middle of your example (also its in the middle of my example, but there it´s thicker because of my settings in the example). I marked it in a screenshot with a question mark.

Maybe you can tell me where´s the mistake.

Thanks,

Yours,

Seiml




Heres the curve from my example:
Versuch 5.3dm (31.7 KB)