2

Is it possible to draw a curve with some specified length between two points? I'm considering damped sines like WolframAlpha or Bezier curves.

not all wrong
  • 16,178
  • 2
  • 35
  • 57
  • 1
    Do you mean, find a function $f(x)$ such that $f(x_0)=y_0$ and $f(x_1)=y_1$? This is clearly possible (provided the specified length is at least as big as the distance between the points...). If you suggest a particular family of curves, then typically such a function will exist, though how easy it is to find depends on the specific family. – not all wrong May 13 '13 at 00:34
  • Thanks for reply. Yes, like in the wolfram's example where the arc length is known. How do this in best way? – luk4ward May 16 '13 at 12:11

2 Answers2

1

You have three conditions to satisfy. The simplest SMOOTH one is a parable.

Felix Marin
  • 89,464
0

If a specified length and specified endpoints are all you want, there are very many ways to do that. The easiest smooth way to proceed is probably to make it a circular arc ... whose center you'll need to find numerically (unless you happen to have an inverse sinc function available).

  • whose center you'll need to find numerically -- I don't think so; it's a fairly simple calculation. Conceivably, it could be done without even using trig functions (though I haven't checked). I agree that a circular arc seems like the best choice, if end-points and arclength are the only constraints.

    – bubba May 13 '13 at 02:09
  • I was wrong. It looks like an inverse sine function is needed, but every math library provides this. I don't see where an inverse sinc function is needed. Typo, maybe? – bubba May 13 '13 at 02:21
  • @bubba: I've tried to derive the center in two different ways, and in each of them I end up needing to invert sinc or solve $\sin x = ax$. Perhaps you should write your calculation with just an arcsine as an answer? – hmakholm left over Monica May 13 '13 at 14:26
  • it looks like you're correct. My apologies. I quit halfway through the calculations because I thought I could see the end result. My mistake. – bubba May 14 '13 at 03:02
  • Thanks for reply. Ok, you are right - this is the easy way. But if the length is very long then i have to stretch up those circular arcs. Thats why i come up with the damped sine or maybe beziers? But its rather complex and there are no equations which will help to simplify this task... – luk4ward May 16 '13 at 12:17