{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import scipy.optimize\n", "import lmfit\n", "from math import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Circle Fitting Research" ] }, { "cell_type": "raw", "metadata": { "nbsphinx-toctree": { "hidden": true }, "raw_mimetype": "text/restructuredtext" }, "source": [ ".. contents::\n", " :local:\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction\n", "\n", "This document is an exploration into the mathematics and algorithms of fitting lines and circles to a limited number of points which are a subset of an aircraft track." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def plot_data(dataset):\n", " x = []\n", " y = []\n", "\n", " for x_coord, y_coord in dataset:\n", " x.append(x_coord)\n", " y.append(y_coord)\n", "\n", " plt.scatter(x, y)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### data1\n", "an aircraft travelling in more or less a straight line (perhaps with a slight curve)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAD7CAYAAACSXhiEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFT9JREFUeJzt3X+M3PV95/Hnm9h73VMwv7oxKk526CXEJBXljEqsq+4y\npjUYokKqaxIiRSEpVUpIW9RTU0yoDle9HwFdLwQhp+p1r4WctHYKVULbNCUR3t4/MSwHjmnCD+cu\ns8Wk5SYpIKWyDgPv+2M+C8Oya/vj/e7O7O7zIY30mc/3O99572fG89rv5/P1TmQmkiTVOGXQBUiS\nVh7DQ5JUzfCQJFUzPCRJ1QwPSVI1w0OSVG3doAs4GRHh9cWSdBIyM5o4zoo988jMob/dcsstA69h\nNdRondY57LeV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jv33eM/U/Yceq8Dvizst909C5KOKs87xvGkJMb20XVGRE/RW8++FsREeXYj0TExSzzeB7vfRoR\n19Cbyrikr7vJ9+lSWug1X1Zlkfke4IuZ+ZXS/WxEbMzMZ8vU4/8t/bWvf1N+FrgyIq4ARoFTgdvp\nTfOcyOfLaZn5XEQs+t/3cRymd8b+cLl/L73wWPrxbHLhZrG3UuxFffdnF5tGgHN5bSHyTby28DfC\nGxciP5SvLWhdV9rX89qC1tUsfsH828B7S/vngOnS7l8w38r8C1Kz7dPLtgfpzYMGvamQHQ2O6SeA\n3y3t84CZpsd2Cd4H3wPOGLbxpDcH/G3grDn9QzuWc+qcr57zl/p556njbuC/zum7FbixtHfy2gJv\n9eu/BPW+l9cvmJ/w58tC742G6/sb4LzSvqWM5ZKP57K+aY7xw7+f3nzbEeDvgb/q23ZTGfDHKVc3\nlf4d9K7UOATs7Os/t3x4PFVe6PWl/58BXyr77wdai6z5XwEPlzfGN4F/2bftzlLzt3j91WMfK8//\nFPDRvv6LgMfKts83PLbrgS+W4z9MCbwmx3YJ3g//h3K11TCNZzneDPBIue0e9rGc52eYt57lutH7\njf5lesH1aBnHHcCZwDdKbV+n74Or9vVfgpr7w6P682Wh90aD9f00MF3G9M/oBcCSj6d/nkSSVG3Y\nr7aSJA0hw0OSVM3wkCRVMzwkSdUMD0lSNcNDklTN8JAkVTM8JEnV/j/VZ8Zy4M1JvAAAAABJRU5E\nrkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "data1 = [[-7823.439561574536, -2568.6287717351497],\n", "[-5107.037760476856, -1043.730245427465],\n", "[-2762.7301083133757, 190.28046761840392],\n", "[-259.35055129732217, 1076.7365979969445],\n", "[2135.210021244198, 2041.7607403979657],\n", "[4013.295597771261, 2335.1731250977123]]\n", "\n", "plot_data(data1)\n", "plt.axes().set_aspect('equal', 'datalim')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### data2\n", "noisy data of an aircraft turning" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEACAYAAAC6d6FnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFaBJREFUeJzt3X+s3XWd5/Hni4XudH5Qfsy1rCD3uoIUzRK2Lj822awX\nx0phN6Ib2UF3F/wxia6MY5xsBsgYW0eNsokbxzGVrNOwkAwFZ0gUR5RK4K4xE6AOMNWV0jozt1AY\nOncidWeVSNX3/nE+JafHe3t//+r3+UhO+N739/M9532/nJ7X/X4/53tOqgpJUvecsNwNSJKWhwEg\nSR1lAEhSRxkAktRRBoAkdZQBIEkdNW0AJNme5GCS3X21tyX5bpKfJdk4MP6mJPuSPJHkTX31zUn2\nJNmb5Ia++kiSh5I8mWRHkhMX6peTJE1tJkcAtwKXD9S+A7wV+N/9xSTnA/8ROB+4AtiWnhOAz7X7\neS3w9iQb2mY3A5+uqvOAQ8B75vi7SJJmYdoAqKpvAc8P1J6sqn1ABoZfBdxZVT+tqnFgH3Bxu+2r\nqv1VdRi4s40FeANwd1u+jV6wSJIW2ULPAZwJPN338zOtNlg/AJyZ5HTg+ar6eV/95QvckyRpEgsd\nAINHBAA1TX1wnZ9NIUlLYKEnXA8Ar+j7+SzgWXov8mcP1qvqH5KckuSEdhRwZPykkhgOkjQHVfUL\nf4jP9Ahgsr/U+9cdcQ9wTZI1SV4JnAM8AuwCzkkynGQNcA3w5bbNA8DVbfm6vvpUv8Sy3rZs2bLs\nPRzvPa+2fu3Zfld6z1OZydtA7wD+Anh1kqeSvCvJW5I8DVwK/HmSr7UX5+8BXwS+B9wLvL96fgb8\nNrAT+D/0Jor3tIe4EfjdJHuB04Dt0/UkSZq/aU8BVdU7plj1pSnGfxL45CT1rwPnTVL/W+CS6fqQ\nJC0srwSepdHR0eVuYdZWW8+rrV+w56Ww2vqFld9zjnV+aKVJUqupX0laCZJQ85gEliQdZww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jX31V9J7Z8Veeu9KOGmp+m3rPkfvXQZ/xdHvqnhn63UvcG1f/XXA\nd9q6P1zEfbwP2E/v4sFHgW2tfuQfzWP0Lgy8crregNOA+9v+/wZwylL129bd1PbxE8CbVsJzoj3O\nW+idX34B+Dvgayt5Hx+r55W8nwf6v73v3+KX6M2dzKn/pbp5IZgkdZSngCSpowwASeooA0CSOsoA\nkKSOMgAkqaMMAEnqKANAkjrKAJCkjvr/PQCdlHPYFUcAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "data2 = [[-2736.5842226839904, 9051.690473155024],\n", "[-1973.134855393139, 9237.219387656745],\n", "[-1307.9423416823379, 10095.120237700188],\n", "[-1212.8163721100887, 10729.934781668326]]\n", "\n", "plot_data(data2)\n", "plt.axes().set_aspect('equal', 'datalim')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Line Fitting" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Scipy Line Fitting\n", "\n", "This is a first foray into doing line fitting using minimization of perpendicular offsets using scipy's minimization function." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEACAYAAABLfPrqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYVNWZ7/Hvy800KoikgxG0O0YNxhuiIjEaGhVFUBDx\ngpNzVMR4AUYfcyYTjfNEcpJnJuZMEnVswEsLgtq0IqMYREGhM5lEBIIIytUxTQAVWwUippXbe/5Y\nu6Fo+7a7qnpXd/8+z1OPu1btXfvtVVW+rLX2WtvcHRERkTjaJR2AiIi0PEoeIiISm5KHiIjEpuQh\nIiKxKXmIiEhsSh4iIhJbRpKHmXU1s2fMbLWZvW1mZ5lZNzObZ2ZrzexlM+uasv8DZr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QBd335p6svrqzcymu/vt0X4zzezRBmLcRGhyp5YvrGf/WjUQ0y2Ezwt3X2LhgoPu0Tm+\nVD80rd4m8BNDAAACM0lEQVQaHZOZnUToW37TzCx6n2Vm1o8E6ymK7TrC+NR5KcWZ/H5lSl2fXdZE\nA88zCd151XO+tsT4bdf3OTbFd4FhZjYEyCN0F90HdG3kb7uru281s1jfoUbYRGhVL42eP0tIHtmv\nq2z1Uzax/24hcHrK866EwbkRtez7OmGhRSM0+QdH5feyvy/4TvYPFKUOIvengQHzemKqHvDqBHyD\n/QOa7dk/qNiJLw9oXp3Sl3hLtD2W/YNqo4g/YP42IQFCmKy5pL6/lQMHxaq3D6uvPpvwGd4E/Cza\nPh7YkOl6S/M79hegWw7U0+Do8+teozwn6qlGTLWd+4RMnqOWc04DflOjLNZvu77PMc3YBnDggHmj\nf9t1fb5pxvN74Pho+56onrJeV1n78GP+8ZcR+tuqCDPPqwed7gY+BZZFFb6M/VfvnA6sJCyJcn/K\nex0OvEK4QmN+agUQloN/B3iTegbm64speu2u6H1WE13tFJUPjs67ngOXZ/kG4X8666IvW8eo/CDg\n6Wj/RUBhzHo7G1ga1c1rwGkN/a3A9dH51gHXppTXWp9N+Cw7AtOj91pKlNwyWW9pftfeJRowT7ie\n1gMbou/0MqL/0eRKPdUSb63nzsaD8K/8PYQkVf27H0wTftt1fY5pxpeaPGL/tuv6fNOI51RgSVRf\nswgJIOt1pUmCIiISW4u52kpERHKHkoeIiMSm5CEiIrEpeYiISGxKHiIiEpuSh4iIxKbkISIisSl5\niIhIbP8fGNlb0+wvLHMAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "def perpendicular_distance(m, c, point):\n", " \"\"\"returns a positive if on the right side of the line\n", " returns a negative if on the left side of the line\"\"\"\n", " a = m\n", " x1 = point[0]\n", " y1 = point[1]\n", " \n", " d = (a*x1 - y1 + c)/(sqrt(a*a + 1))\n", " return d\n", "\n", "def least_squares_distance(m, c, points):\n", " distance_sum = 0\n", " for point in points:\n", " distance_sum += perpendicular_distance(m, c, point)**2\n", " \n", " return distance_sum\n", "\n", "def func(x, *args):\n", " return least_squares_distance(x[0], x[1], args[0])\n", "\n", "retval = scipy.optimize.minimize(func, [0,0], args=(data1))\n", "m = retval.x[0]\n", "c = retval.x[1]\n", "\n", "plot_data(data1)\n", "\n", "x = np.linspace(-10000, 5000)\n", "y = []\n", "for val in x:\n", " y.append(val*m + c)\n", "\n", " \n", "plt.plot(x, y)\n", "plt.axes().set_aspect('equal', 'datalim')\n", "\n", "\n", "# least_squares_distance(1, 1000, data1)\n", "\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Newton Line Fitting" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Gauss-Newton Line Fitting" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Circle Fitting" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### three point circle solver" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQkAAAEACAYAAACgZ4OsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VVW6x/Hvm0YooUjoLQgGIoYWBATEQ3HAgGFEGEFQ\nsSCCoN47zoCOM+KjXkUdy9DEBio6gKACQxEGEkV6lRYIXSBIlyKCQNb9YweNISSH5JyzTnk/z5PH\nc5KdvX/E8LLW2muvJcYYlFLqSsJsB1BK+TctEkqpfGmRUErlS4uEUipfWiSUUvnSIqGUyleBRUJE\n3heRgyKyPp9j/iUi20RknYg09mxEpZRN7rQkxgOdrvRFEbkNqGOMuQ4YALztoWxKKT9QYJEwxnwL\nHM/nkG7AR9nHLgfKi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jU4Em/p4Z6ARMyH4dC+wByvlx3lnAfdmvE4B9fvC7EQdsuMLXkvlt4LIlbg5ceitoZ5x/\nBbYBw7I/9xzQNft1MZwKvA1nIDDO8g+2oLzzcWabrgHWAl/6wS9DvplzHbsQy3c33M0M/BPYBHwH\n9PTnvNmF4dvsArIG6GA576c4LYNzwPfA/cAA4OEcx4zKLn7fufs7oZOplFL50iX1lVL50iKhlMqX\nFgmlVL60SCil8qVFQimVLy0SSql8aZFQSuVLi4RSKl//DwkrRpvJPPwOAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "class Circle:\n", " def __init__(self, pos, radius):\n", " self.pos = pos\n", " self.radius = radius\n", "\n", " \n", " @staticmethod\n", " def from_three_points(p1, p2, p3):\n", " dy1 = p2[1] - p1[1]\n", " dx1 = p2[0] - p1[0]\n", " dy2 = p3[1] - p2[1]\n", " dx2 = p3[0] - p2[0]\n", " \n", " slope1 = dy1/dx1\n", " slope2 = dy2/dx2\n", " \n", " x = (slope1*slope2*(p1[1] - p3[1]) + slope2*(p1[0] + p2[0]) - slope1*(p2[0] + p3[0]))/(2*(slope2-slope1))\n", " y = -1*(x - (p1[0] + p2[0])/2)/slope1 + (p1[1] + p2[1])/2\n", " \n", " x1 = x - p1[0]\n", " y1 = y - p1[1]\n", " r = sqrt(x1*x1 + y1*y1)\n", " \n", " return Circle([x,y], r)\n", " \n", " def get_plot(self, **kwargs):\n", " return plt.Circle((self.pos[0], self.pos[1]), self.radius, **kwargs)\n", " \n", " def __str__(self):\n", " return \"Circle([{0},{1}],{2})\".format(self.pos[0], self.pos[1], self.radius)\n", " \n", " def distance2(self, point):\n", " return (sqrt((point[0] - self.pos[0])**2 + (point[1] - self.pos[1])**2) - self.radius)**2\n", " \n", "\n", "\n", "c1 = Circle([1,1], 1)\n", "c2 = Circle.from_three_points([-1, 0], [0, 1], [1, 0])\n", "\n", "fig, ax = plt.subplots()\n", "ax.add_artist(c1.get_plot(edgecolor=\"r\", facecolor=\"none\"))\n", "ax.add_artist(c2.get_plot(edgecolor=\"g\", facecolor=\"none\"))\n", "ax.set_aspect('equal')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Scipy Minimize Circle Fitting\n", "The following two cells demonstrate using scipy's minimize function to solve for circles using the conventional parameterization:\n", "\n", "$$d_i = \\sqrt{(x_i - a)^2 + (y_i - b)^2} - R$$\n", "$$F = \\sum_{i=1}^{n}d_i^2$$\n", "\n", "Where F is the function we are trying to minimize." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Guess(green): Circle([-2676.9263298024503,10469.756101355182],1419.3199745179995)\n", "Answer(red): Circle([-2744.1154157915385,10576.023919859705],1530.7115839583885)\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEACAYAAAC6d6FnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81NW9//HXJwt7WA0hYQsq+6ISQOqlJSBIwBpwR7wF\nd5Rqa729FX9uuF3q7dWqtWBFqriB4gJRUJZiQEGRTQVkU2RNgCCLkTUJ5/fHfKFDmCRknRnm/Xw8\n5uHkfM9k3jPE72fOOd/vd8w5h4iIRJ6oYAcQEZHgUAEQEYlQKgAiIhFKBUBEJEKpAIiIRCgVABGR\nCFViATCziWa208y+8Wu7ysxWmVmBmXUt1P8+M9tgZmvM7BK/9jQzW2tm683sXr/2ZDP7wszWmdlk\nM4upqBcnIiJFO50RwMvAgEJtK4HLgfn+jWbWHrgGaA8MBMaZTxTwvPd7OgLXmVk772FPAk8559oC\n+4Cby/haRESkFEosAM65z4C9hdrWOec2AFao+2BginMu3zm3CdgA9PBuG5xzm51zecAUry9AX+Bd\n7/4kfIVFREQqWUWvATQFtvr9vN1rK9y+DWhqZo2Avc65Y37tSRWcSUREAqjoAlB4RADgSmgvvE3X\nphARqQIVveC6D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tz+M7yuBrTj6q4gYv63pguF97CrDS2/ZsJb7HG4DN+E4eXA6M89qP/0+zAt+JgYNK\nygY0BOZ67/8coH5V5fW23ee9x2uAS0Lhb8J7niH45pcPAdnAR6H8HheXOZTf50L5X/X7f3EavrWT\nMuWvqptOBBMRiVCaAhIRiVAqACIiEUoFQEQkQqkAiIhEKBUAEZEIpQIgIhKhVABERCKUCoCISIT6\n/90sKSEYrGNxAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "\n", "def circle_ri(a, b, radius, points):\n", " r_sum = 0\n", " c = Circle([a, b], radius)\n", " for point in points:\n", " r_sum += c.distance2(point)\n", " \n", " return r_sum\n", "\n", "def func(x, *args):\n", " return circle_ri(x[0], x[1], x[2], args[0])\n", "\n", "c1 = Circle.from_three_points(data2[0], data2[1], data2[2])\n", "\n", "retval = scipy.optimize.minimize(func, [c1.pos[0],c1.pos[1],c1.radius], args=(data2))\n", "a = retval.x[0]\n", "b = retval.x[1]\n", "r = retval.x[2]\n", "\n", "c2 = Circle([a,b], r)\n", "\n", "\n", "plot_data(data2)\n", "\n", "print(\"Guess(green):\", c1)\n", "print(\"Answer(red):\", c2)\n", "\n", "\n", "ax = plt.gca()\n", "ax.add_artist(c1.get_plot(edgecolor=\"g\", facecolor=\"none\"))\n", "ax.add_artist(c2.get_plot(edgecolor=\"r\", facecolor=\"none\"))\n", "\n", "plt.axes().set_aspect('equal', 'datalim')\n" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Guess(green): Circle([45793.89384213992,-94898.80121838693],106769.28015751315)\n", "Answer(red): Circle([12107.017055118396,-33336.20943681085],36638.49292318794)\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAD7CAYAAACSXhiEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc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gZfi390k9/eHu9IjY3AkBztF/g/Hhv8\nDzrSbz8FeNefPx6IymfNrYFE/4uxCGiS47VX/JpX8Pujx+7y178B6JGj/TJglf/aS0HetpHAZH/5\nifiBF8xtWwDfh+/xj7YKp+3pLy8ZWOY/YsN9W+byN+RaT2E98P5Fn4UXXN/427E9UBGY69f2OTl+\nuAL9/Aug5pzhEfDvS17fjSDW1whI8LfpTLwAKPDtqcuTiIhIwML9aCsREQlDCg8REQmYwkNERAKm\n8BARkYApPEREJGAKDxERCZjCQ0REAqbwEBGRgP0/VZC7J/G9NpIAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "c1 = Circle.from_three_points(data1[0], data1[1], data1[2])\n", "\n", "retval = scipy.optimize.minimize(func, [c1.pos[0],c1.pos[1],c1.radius], args=(data1))\n", "a = retval.x[0]\n", "b = retval.x[1]\n", "r = retval.x[2]\n", "\n", "c2 = Circle([a,b], r)\n", "\n", "\n", "x = []\n", "y = []\n", "\n", "for x_coord, y_coord in data1:\n", " x.append(x_coord)\n", " y.append(y_coord)\n", "\n", "plt.scatter(x, y)\n", "\n", "print(\"Guess(green):\", c1)\n", "print(\"Answer(red):\", c2)\n", "\n", "\n", "ax = plt.gca()\n", "ax.add_artist(c1.get_plot(edgecolor=\"g\", facecolor=\"none\"))\n", "ax.add_artist(c2.get_plot(edgecolor=\"r\", facecolor=\"none\"))\n", "\n", "plt.axes().set_aspect('equal', 'datalim')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### SciPy Levenberg-Marquardt Least-Squares Circle Fitting" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Guess(green): Circle([45793.89384213992,-94898.80121838693],106769.28015751315)\n", "Answer(red): Circle([12051.872411956107,-32914.71010089948],36234.900858877416)\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAD7CAYAAACSXhi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8iNu0M/CCP10V2BTsbZsLn4MNwDnhtj3x+oC/A847rj1st+VxdWZVT/XcXm8WdUwAhh7X\nNhB4yp/uw7EB3oB//7lQb2P+OGB+yt8v2X02glzfN0BVf7qvvy1zfXue0Q/NCX74O/D625KBX4HP\nMr32tL/BV+Mf3eS3N8c7UmMd0CdT+6X+l8da/xcd4bcXA973508AonJYc0Ngsf/BWADUyvTaCL/m\n5fzx6LH7/fWvBTpkar8WWOm/9mqQt20E8La//MX4gRfMbZsLn4f1+EdbhdP29Je3CVjqP+LCfVtm\n8TNkWc+ZeuD9RZ+OF1zf+tuxOXAuMNOv7UsyfXEF+vvPhZozh0fA3y/ZfTaCWN81QKK/TT/CC4Bc\n3566PImIiAQs3I+2EhGRMKTwEBGRgCk8REQkYAoPEREJmMJDREQCpvAQEZGAKTxERCRgCg8REQnY\n/wNqR9e7aMzJKgAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "def circle_ri(a, b, radius, points):\n", " residuals = []\n", " c = Circle([a, b], radius)\n", " for point in points:\n", " residuals.append(c.distance2(point))\n", " \n", " return residuals\n", "\n", "def func(x, *args):\n", " return circle_ri(x[0], x[1], x[2], args)\n", "\n", "c1 = Circle.from_three_points(data1[0], data1[1], data1[2])\n", "\n", "retval = scipy.optimize.least_squares(func, [c1.pos[0],c1.pos[1],c1.radius], args=(data1), method=\"lm\")\n", "a = retval.x[0]\n", "b = retval.x[1]\n", "r = retval.x[2]\n", "\n", "c2 = Circle([a,b], r)\n", "\n", "\n", "plot_data(data1)\n", "\n", "print(\"Guess(green):\", c1)\n", "print(\"Answer(red):\", c2)\n", "\n", "\n", "ax = plt.gca()\n", "ax.add_artist(c1.get_plot(edgecolor=\"g\", facecolor=\"none\"))\n", "ax.add_artist(c2.get_plot(edgecolor=\"r\", facecolor=\"none\"))\n", "\n", "plt.axes().set_aspect('equal', 'datalim')" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Guess(green): Circle([-2676.9263298024503,10469.756101355182],1419.3199745179995)\n", "Answer(red): Circle([-2749.8969143634604,10575.118314312538],1533.689331374633)\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEACAYAAAC6d6FnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX9//HXJyTsERBCSNiiIggKFQKolMoiyKIEd5HW\nfUFotdb2V7X2K1j1q35brbUt2CpaURQqKkSRRTZRFIHIpsgiENYAUVkCEshyfn/MBYeQfbszzPv5\neMyDyblnMu8Z4/3MOefeO+acQ0REIk+U3wFERMQfKgAiIhFKBUBEJEKpAIiIRCgVABGRCKUCICIS\noUosAGY23sx2m9mqoLZrzOxLM8szsy4F+j9kZhvM7GszuzSofaCZrTWz9Wb2QFB7kpktNrN1Zvam\nmUVX1osTEZGilWYE8AowoEDbauBK4KPgRjNrD1wHtAcGAWMtIAr4h/d7zgVuMLNzvIc9DTzjnGsH\n7ANuL+drERGRMiixADjnPgH2Fmhb55zbAFiB7kOBSc65XOdcOrAB6O7dNjjntjjncoBJXl+AvsDb\n3v1XCRQWERGpYpW9BtAc2Bb08w6vrWD7dqC5mTUG9jrn8oPaEys5k4iIFKKyC0DBEQGAK6G94DZd\nm0JEpBpU9oLrdqBl0M8tgJ0EdvKtCrY75741s4ZmFuWNAo71L5SZqTiIiJSDc+6kD+KlHQEU9kk9\neNsxqcAwM6tpZmcAbYAlwFKgjZm1NrOawDBgmveYecC13v2bg9qLehG+3kaPHu17hlM9c7jljZTM\nw6YM42+L/1b49rfewg0cGFJ5Q+EWKpmLUprDQN8APgXamtlWM7vVzK4ws23AhcD7ZjbD2zmvAf4L\nrAE+AEa5gDzgV8Bs4CsCC8Vrvad4ELjfzNYDpwPjS8okItVvVNdRjF06tvAdyoABsGgRZGVVfzAp\ntxKngJxzw4vYNLWI/k8CTxbS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ilthl8Qo14p7OfOW9cS7Sj0hr6TMXp+HgRzn3Bten51AKxc4MqwLMNUrtFV+\nsmAZ874Z1KewXIV9sKrUv4nSZi6Eb+8xlDuzr+/zCUGKyQ+MBf7knHNm9jiBKyXcUUiWY3mKyl9t\nIrIAOOf6l7Lrm8B0YEzwVItzboaZjTWz0wlU7VZBj2kB7HTOfWtmDc0syvsk0oLA/3xVnfd9AgVg\nO9CyYC6vvXeB9vnF9C+XkjKb2c0E1in6Bj0mB9jr3f/CzDYSKLLFZdtlZvEucE5JM2BPdeUtJpdR\nxX8TpclcxGN8e4/Lm7mYbNXyPgcrQ/4XgWMFrUz5K5qxLDQFVICZtQn6cSjwtdceH9SnO4FDaL8H\nlgJtvKMrahI4s3ma13UecK13/+ag9qrMu9a7nwrc5PU5fuIdMAvob2YNLHAl1v7ALG9of8DMupuZ\neY+t9LxenoHA74EU59yRoPYmZhbl3T8TaANsKiFbKnCLd7+q3uNC83rPPczMaprZGV7eJfj8N1HY\nSzh+J0Tf4+IyEybvswUdgQdcxYknwZY2f2pV5zxBda44h8MNmAKsIrAiPw1I8Np/6f0HXQ58ClwQ\n9JiBwDoCizsPBrWfQeDIivUEjkqIqa683rZ/EDjKYCUnHlVxi5d1PXBTUHsysNrb9rcqfI83AFsI\nnDz4BTDWaz/2P81yAicGDi4pG3A6MMd7/z8EGlZXXm/bQ957/DVwaSj8TXjPcwWB+eXDQAYwI5Tf\n4+Iyh/L7XCD/hKD/F6cSWDspV/7quulEMBGRCKUpIBGRCKUCICISoVQAREQilAqAiEiEUgEQEYlQ\nKgAiIhFKBUBEJEKpAIiIRKj/DzLDU4PSnAkrAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "c1 = Circle.from_three_points(data2[0], data2[1], data2[2])\n", "\n", "retval = scipy.optimize.least_squares(func, [c1.pos[0],c1.pos[1],c1.radius], args=(data2), method=\"lm\")\n", "a = retval.x[0]\n", "b = retval.x[1]\n", "r = retval.x[2]\n", "\n", "c2 = Circle([a,b], r)\n", "\n", "plot_data(data2)\n", "\n", "print(\"Guess(green):\", c1)\n", "print(\"Answer(red):\", c2)\n", "\n", "\n", "ax = plt.gca()\n", "ax.add_artist(c1.get_plot(edgecolor=\"g\", facecolor=\"none\"))\n", "ax.add_artist(c2.get_plot(edgecolor=\"r\", facecolor=\"none\"))\n", "\n", "plt.axes().set_aspect('equal', 'datalim')" ] } ], "metadata": { "celltoolbar": "Edit Metadata", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 1 }