Catenary Script

 From:  bemfarmer
Attached is a simple Catenary Script. It makes a nice revolve.

Catenary or Arch script for MoI
August 26, 2011
By Brian McMillin
The procedure for creating a Catenary or Arch script for MoI began to become clear after a lot of google searches. A Catenary curve is the shape produced by a wire or chain or rope, or other material, which is inelastic and flexible, and is suspended from two supports. It resembles a parabola, but is a different curve. In an X,Y coordinate system, when the catenary is oriented symmetrically about the Y axis, vertex intersecting the Y axis, with gravity in the negative Y direction, the equations for the catenary are as follows:
Y = a*cosh(x/a) = ( a/2)* ( e^(x/a) + e^(-x/a) )
Where the a parameter is the minimum Y value, at the intersection of the Y axis.
(See Wikipedia for graphs, mathematics, and further information.)
The parametric equivalent equation for the catenary, where t = 0 at Y axis vertex, is:
x(t) = t
Y(t) = a*cosh(t/a) = ( a/2)* ( e^(t/a) + e^(-t/a) )
Here is my first rudimentary effort to create a script for half of a catenary, “CatenaryHalfDraft”
It is based upon modifying the existing “ToroidHelix” script.
Enter a maximum value for X. (positive)
Enter a value for a. (positive Y vertex)
Enter a value for Points per X unit.
Checkbox for Arch. (Haven’t figured out check boxes yet. Not really needed.
CatenaryHalf is a rudimentary script for MoI, which creates half of a catenary. Mirror other half of catenary. Rotate and move for an Arch.
A more professional script would interactively hang a catenary by selecting two points of different heights, given either a Length of catenary arc, or a third point on the catenary, and perhaps behave similarly to the Conic command.
Internet search revealed non-copyrighted posts by elbarto and opalg (mathematics), as well as Grasshopper script posts by Giulio Picentino, and Daniel Davis. A MoI script should be possible, without copying any of the scripts, by using mathematics described by opalg and others. As the equations are not analytically solvable, this requires numerical methods, such as Newton-Raphson, and “hill climbing.”

EDITED: 20 Feb 2018 by BEMFARMER

Image Attachments:
Size: 26.7 KB, Downloaded: 9 times, Dimensions: 160x91px