Catenary Curves?


Has anyone looked into getting this math equation to work for creating a spline in max?

I know max creates arc’s similar to this. But not quite exactly the same as seen here?

I’d love to be able to create ropes at the proper draping like these below.

[SOLVED] Hanging rope (catenary)

Does anyone know how to get something like this working in max with a spline.

Where we could pick a start and end point, then users would input the value for weight.


Easy way

delete objects
fn makeWire posStart posEnd sink:0.25 btw:0.5 =
	local catenary = splineShape wirecolor:black
	local dir = normalize (posEnd - posStart)
	local dist = (distance posStart posEnd) * btw
	local posMiddle = posStart + dir * dist
	posMiddle.z -= (dist * sink)
	splKnots = #(posStart, posMiddle, posEnd)
	addNewSpline catenary 
	for i = 1 to splKnots.count do addKnot catenary 1 #smooth #curve splKnots[i]
	updateshape catenary
sphArr = for i = 1 to 5 collect sphere radius:5 wirecolor:yellow pos:[(100*i-100),0,100]
while sphArr.count > 1 do
	makeWire sphArr[1].pos sphArr[2].pos sink:(random 0.25 1.5) btw:(random 0.2 .8) 
	deleteItem sphArr 1


interesting… i’ve played with it a long time ago. to generate knots with some step is not a problem. but for me will be fun to play with a math to write the Cutenary curve to the Bezier curve convertion.


the only one who knows how to implement cool math formula in mxs are you.
I withdraw aside and watch your magic. :thumbsup:


are you sure that i will share it? :wink:


Of course, not. I’m not requested this so… show at least some interesting mind blowing example :slight_smile:


Oh, snap!

I imagine that Denis is actually an alien prince sent here to learn about our ways and toy with our puny minds.


I’m looking around on the internet for other explanations of the math. hopefully one well enough that I can better understand it haha.


y = (a)cosh(x/a)
y = (a/2)
(e^x + e^(-x))


as i said the Catenary equation is transparent. the idea is to get good approximation with Bezier


fair enough. its just figuring out how to get the bezier handles to position correctly to that of duplicating the Catenary.


It would be nice to have the ability to choose the start and end points of a line and then a spinner to adjust the sag/rope weight.


where does weight comes in?


Diagram of forces acting on a segment of a catenary from c to r. The forces are the tension T0 at c, the tension T at r, and the weight of the chain (0, −λgs). Since the chain is at rest the sum of these forces must be zero.

I’m just trying to think of the workflow of using a catenary line in 3d.


in your case only length of chain (rope, etc.) make sense.


The parametric form of the catnernary is easier to work with…it needs only one variable…


it needs one variable and one constant.
x(t) = aln(t)
y(t) = a/2
(t + 1/t)


Next youll be making minimum energy surfaces. :smiley:



This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.