This content has been marked as final. Show 5 replies
the assumption in the first line of catenaryApprrox() is that y1<=y2. if you're dragging your mouse around, you can expect problems when y1>y2.
While I feel stupid for not having noticed that, it didn't help. Symptoms remain the same; further, I forgot to add that when the constant point is (a,b) and the mouse is hovered over the base point, the result is a diagonal line from (a,b) to (a/2, b/2).
Many thanks for your time, kglad. I'm sorry to keep bringing this up.
well, you can't expect a catenary to exist when x1=x2. here's code to prevent that attempt:
Okay, so I got to playing around with this and I came up with the following solution. It makes no pretensions whatsoever to mathematical correctness, but it looks about right and even looks like it "runs out of cord". Many thanks for your time, kglad. Just attach the attached code to an empty movie clip; it generates a cable-like curve from that clip's location to the mouse pointer's location.
EDIT: Looking at it, I noticed that it doesn't do much to play nice with the layering system. That might be a problem; it might not. I've not tested it.