The Stack Overflow podcast is back! Listen to an interview with our new CEO.

1 of 17

# Curve fit based on minimal data

I have 6 curve types

• Type A: If point 1 is positive and point 2 is negative, the curve will not pass through the origin.
• Type B: If point 1 is negative and point 2 is positive, the curve will pass through the origin twice.
• Types C-F: If both points are positive or both points are negative, the curve will pass through the origin once.

The curves are basically partial (and skewed to some degree) limaçons:

What is known:

• The coordinates of points 1 and 2.
• The slopes at points 1 and 2.
• The approximate curve type (limaçon).

What is not known:

• The arc length.
• The degree of skew.

Data for A-F:

A {{0.000564367, 0.690525}, {-0.000689501, -0.984192}, 2.75153, -1.82771}

B {{-0.000689501, -0.984192}, {0.000664785, 1.07289}, -2.10116, 1.9517}

C {{0.000179304, 1.61576}, {0.0000936314, 0.852042}, 1.08897, 3.98758}

D {{0.000116063, 0.431337}, {0.000443491, 1.70111}, 2.63092, 1.50293}

E {{0.0000347276, 0.190688}, {0.000190634, 1.06651}, 7.04831, 2.28105}

F {{-0.000432719, -1.90935}, {-0.000142565, -0.645011}, -1.44646, -1.79681}

in format: {{point 1}, {point 2}, slope @ point 1, slope at point 2}

Is it possible to estimate a curve fit (and hence arc length & skew) with only the data given?