MoI discussion forum
MoI discussion forum

Full Version: Catenary Script

Show messages: All  1-4  5-13

From: bemfarmer
30 Aug 2011   [#5] In reply to [#4]
Thankyou Michael.
More to come, later after work...
From: bemfarmer
22 Mar 2012   [#6]
Attached is an unofficial Catenary curve creation script.

It works well in the TOP view.
Catenary2PtXY is a script which produces a catenary in the xy plane, from two points picked by the user.
Gravity is in the negative y direction.
In the event that the z coordinates of the two points are not equal, an alert requiring equal z coordinates is given.

This script uses the Opalg math, and most of the elbarto code.

Nearly all of the MoI Distance script is used to select the two points, and measure the distance between the two points.
The user inputs the chain length, which must be greater than the distance between the two points, or a catenary will not form.
In the event that a catenary does not form, even though the chain length is greater than the distance between the two points,
OR if the catenary is upside down, the Newton-Raphson method has failed, and the user can adjust the GuessRadius parameter,
to be smaller or greater than 1.0.

For a chain length that is long in relation to the x-axis distance between, try a fractional GuessRadius.
For a chain length that is slightly longer than the x-axis distance, try a GuessRadius greater than 1.

An ARCH seems to be formed if a negative GuessRadius is used.

An explanatory PDF titled "Catenary Suspension from Two Points" is being edited, and may be posted later, if anyone is
interested.

Edit: 3/23/2012 Replaced Catenary2PtXY with slightly modified htm. Now works with MoIversion 2 (Windows)
Do not have a Mac...

Still working on a version which will also accept different z coordinate values, by using a coordinate frame...

Attachments:
Catenary2PtXY.7z

Image Attachments:
CatenarySamples.PNG 


From: Michael T. (MICTU_UTCIM)
23 Mar 2012   [#7] In reply to [#6]
Very cool. Thanks for the great script bemfarmer.

Just to clarify, this only works with the Beta V3 version, correct? I tried it with V2 and I get a script error.

Michael T.
From: bemfarmer
23 Mar 2012   [#8] In reply to [#7]
I never tried version 2......should have...
From: bemfarmer
23 Mar 2012   [#9]
Edit: 3/23/2012 Replaced Catenary2PtXY with slightly modified htm. Now works with MoI version 2 (Windows)
(Had an extraneous line of code in the htm.)

Do not have a Macintosh. Perhaps someone will try it out there?
From: Michael T. (MICTU_UTCIM)
23 Mar 2012   [#10] In reply to [#9]
Just downloaded it bemfarmer, I'll give it a spin.

Thanks,

Michael T.
From: Michael T. (MICTU_UTCIM)
23 Mar 2012   [#11] In reply to [#9]
That did the trick bemfarmer. Works great in v2 now!

Michael T.
From: bemfarmer
26 Mar 2012   [#12]
Note: this is an Unofficial script, by an amateur programmer...
The script works pretty good. It needs an adjustment to "aGuess" if the two points are close together, "relative" to the arclength S.
Values of .1 to .5 seem good in that situation. Some additional code to assist NewtonRaphson may be in order.

Here is an updated script which will Also accept points with different z values.
Gravity is still in the -y direction. The two points cannot be vertically one above the other.

Also attached the rambling PDF about catenaries, which has been edited numerous times, but may still have errors...

Just added in a coordinate frame, using previous explainations of Michael, to temporarily rotate the x-axis about the new parallel y-axis, which effectively converts
the z coordinates to zero, so that the prior Catenary2PtXY code is re-used.

Changing the direction of gravity, or finding S given "a," have not been done.
From: bemfarmer
20 Feb 2018   [#13]
Here is the old simple catenary script which seems to have been deleted sometime.
Removed an extraneous line of code which MoI4 picked up as an error.
Works for MoI3 and MoI4Feb2018beta.
- Brian

Attachments:
_Catenary.zip


Show messages: All  1-4  5-13