0

I can see the general solution.. but I was wondering if the wizards here could help me along. :) Given an ellipse with a known major and minor axis.

Take a known r(T) such as, the major or minor axis, and a known arc length A. I'd like to determine any r(t) given any r(T) and A. Numerical approximation is 100% ok, as this is for an applied problem.

Mr. McGee
  • 103
  • You'll need to explain what you mean by r(T) and r(t). I could guess, but maybe I'd guess wrong, which is a waste of my time and yours. – bubba Sep 25 '13 at 00:53
  • r(T) is r theta, as in the polar equation for finding the radius r(theta) for an ellipse. r(t) = ab/sqrt(b cos(t))^2 + (a sin(t))^2) – Mr. McGee Sep 25 '13 at 03:31
  • Good thing I asked, because that's not what I thought you meant. It's an ugly problem. The function $s(\theta)$ that gives the arclength for a given $\theta$ is a nasty integral that can only be computed numerically. Then you want to solve $s(\theta) = A$ to get the $\theta$ value corresponding to a given $A$. That also has to be done numerically. Quite a mess. Unless you need a very accurate answer, I suggest just replacing the ellipse by a string of line segments. You can then step along these line segments until you get the arclength you want. Crude, but I'm sure it will work. – bubba Sep 25 '13 at 08:30
  • Yeah.. thats what i meant by the general solution :) Well, I suppose if I made the line segments small enough, it would suffice for my purposes. As long as I am close, this is for a fairly beefy structural problem, so after a fairly quick convergence, the material variance will be bigger than the inaccuracy created by line segments. – Mr. McGee Sep 25 '13 at 16:33
  • And thanks for confirming my feeling on this one :) – Mr. McGee Sep 25 '13 at 16:34
  • To be more clear, I can't abandon the ellipse, since this problem requires the angles to be reasonably good, and there will be 20 of them per quadrant, and they will all vary from each other, since the arc section is constant. But, I can use the knowledge that the angle will be increasing, subdivide it into tiny chunks, and iterate until I get the section length I need. So I will get r(t) and Delta r(t), sub in a line segment, and step one more r(t), until I get to my section length. I'll look back at how many steps, and that's theta. – Mr. McGee Sep 25 '13 at 17:16
  • Don't you have a CAD system? Most decent systems will allow you to distribute points ate equal arclengths along a curve. If not, the line segment idea will work fine. You can use millions of line segments, if necessary. That will easily give you accuracy that's good enough for engineering/manufacturing purposes. And you can do linear interpolation within each line segment -- you don't have to restrict your attention to end-points only. – bubba Sep 26 '13 at 02:03
  • huh.. since I was thinking in polar, I didn't consider lerping. Thanks :) – Mr. McGee Sep 28 '13 at 18:40
  • And,, by the way.. CAD software comes later, after I have done proof of concept. I needed to generate a table of values to rough some things in first before I started mapping things out in 3D! :) Thanks to your suggestions, I bit the bullet and write a small program to do linear approximation, and it works like a charm to explore the values generated by different parameters. – Mr. McGee Sep 28 '13 at 18:50
  • Glad it worked. I wrote it up as an answer to preserve it for posterity. – bubba Sep 29 '13 at 02:02

1 Answers1

0

This is an ugly problem, I'm afraid. The function $s(θ)$ that gives the arclength for a given $θ$ is a nasty integral that can only be computed numerically. Then you want to solve $s(θ)=A$ to get the $θ$ value corresponding to a given $A$. That also has to be done numerically. Quite a mess.

Unless you need a very accurate answer, I suggest just replacing the ellipse by a string of line segments. To get engineering/manufacturing accuracies, a few hundred line segments is probably enough. You can step along the line segments until you get the arclength you want. On the last line segment, you should do linear interpolation to get the final answer point. Then just calculate the $\theta$ value of this final point.

bubba
  • 43,483
  • 3
  • 61
  • 122