From: Sam Moore Date: Wed, 15 Jan 2014 15:31:16 +0000 (+0800) Subject: Attempt de Casteljau stuff X-Git-Url: https://git.ucc.asn.au/?p=matches%2FFYP2014.git;a=commitdiff_plain;h=2327a5dc388b9dbb0b7ff408364d38e9938282d4;hp=fd118ca7b693b4c6be80a01a3365a94a7f120bf2;ds=sidebyside Attempt de Casteljau stuff Probably doing it wrong. It makes a curve, but it looks like it won't converge to the same curve as the basic algorithm. --- diff --git a/ipython_notebooks/de_Casteljau.ipynb b/ipython_notebooks/de_Casteljau.ipynb index 7e3dbd3..976a6b6 100644 --- a/ipython_notebooks/de_Casteljau.ipynb +++ b/ipython_notebooks/de_Casteljau.ipynb @@ -176,7 +176,101 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Urgh" + "$L P = Q$ and $M P = R$" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def L(n):\n", + " try:\n", + " return L.dynamic[n]\n", + " except KeyError:\n", + " result = asarray([asarray([ nCk(j,k) / (2.**j) for k in xrange(n+1)]) for j in xrange(n+1)])\n", + " L.dynamic.update({n : result})\n", + " return result\n", + "L.dynamic = {} \n", + "\n", + "def M(n):\n", + " try:\n", + " return M.dynamic[n]\n", + " except KeyError:\n", + " result = asarray([asarray([ nCk(n-j,n-k) / (2.**(n-j)) for k in xrange(n+1)]) for j in xrange(n+1)])\n", + " M.dynamic.update({n : result})\n", + " return result \n", + "M.dynamic = {}\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 296 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "points = [(0,0), (0.5,1), (1,0)]" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 298 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Casteljau(P, nPoints):\n", + " while len(P) < nPoints:\n", + " Q = dot(L(len(P)-1), P)\n", + " R = dot(M(len(P)-1), P)\n", + " P = list(Q) + list(R)[1:]\n", + " return P\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 329 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "points = [(0,0), (0.5,1), (1,0)]\n", + "c = Casteljau(points,50)\n", + "PlotBezier(points)\n", + "plot([p[0] for p in c], [p[1] for p in c], 'go-')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 332, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD9CAYAAABHnDf0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtclHXa+PEPR0HzjJkCig4EmIma5qENyRaHpOzos3Ra\ndU3dNsF6nt1tV3PT2u2sz6K0+7PzwTQz23RDES2BChUN11PmY6SJZ0FRUo7D/ftjEh3mvocBZuae\nw/V+vXi9ZOaemcub4Zov1/e6v18/RVEUhBBCeBV/vQMQQgjheJLchRDCC0lyF0IILyTJXQghvJAk\ndyGE8EKS3IUQwgvZTO6/+c1v6NmzJ9dff73mMRkZGcTExJCQkMCOHTscHqAQQoiWs5ncp0yZQk5O\njub9a9eu5fvvv+fAgQO89tprPProow4PUAghRMvZTO4333wzXbt21bx/zZo1TJo0CYARI0ZQUVHB\nyZMnHRuhEEKIFgtsy4OPHj1KZGRk4/cREREcOXKEnj17Whzn5+fXlpcRQgif1dpFBNo8odr0hbUS\nuaIo8qUoPP3007rH4C5fep2LOePGoYDV11NGo8+dC3f8knNx+ast2pTcw8PDKS0tbfz+yJEjhIeH\ntykgIZxtXEYGcwwGi9tmBweTPHy4ThEJ4XhtKstMmDCBrKws0tLS2LJlC126dLEqyQjhbhJTUwGY\nu3AhAfX1mEJDSXn4YRLT0nSOTAjHsZnc77//fvLz8ykrKyMyMpL58+dTV1cHwIwZMxg/fjxr164l\nOjqaDh068Pbbb7skaE+WlJSkdwhuQ89zkZia2pjk3YG8Ly6Tc+EYfkpbCz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clbQd14BzyRYsPKlSuVRx55pPH7999/X5k5c6bFMbfffrvy9ddfN35/6623Ktu3b7c4BpAv+ZIv\n+ZKvVny1ls1WSD8/P1t3N2p6eWzTx7lghQMhhBBXsFmWCQ8Pp7S0tPH70tJSIiIibB5z5MgRwsPD\nHRymEEKIlrCZ3IcNG8aBAwc4dOgQtbW1rFixggkTJlgcM2HCBN577z0AtmzZQpcuXejZs6fzIhZC\nCNEsm2WZwMBAsrKyMBqNmEwmpk6dSnx8PEuWLAFgxowZjB8/nrVr1xIdHU2HDh14++23XRK4EEII\nG1pdrVexbt06JTY2VomOjlZeeOEF1WPS09OV6OhoZdCgQUpxcbEjX96tNHculi5dqgwaNEi5/vrr\nldGjRys7d+7UIUrXsOd9oSiKUlRUpAQEBCirVq1yYXSuZc+52LRpkzJ48GDluuuuU8aMGePaAF2o\nuXNx+vRpxWg0KgkJCcp1112nvP32264P0gWmTJmiXH311crAgQM1j2lN3nRYcq+vr1cMBoNy8OBB\npba2VklISFC+/fZbi2Oys7OV2267TVEURdmyZYsyYsQIR728W7HnXBQWFioVFRWKopjf5L58Li4d\nd8sttyipqanKxx9/rEOkzmfPuTh79qwyYMAApbS0VFEUc4LzRvaci6efflr505/+pCiK+Tx069ZN\nqaur0yNcpyooKFCKi4s1k3tr86bDlh9wdE+8J7PnXIwaNYrOnTsD5nNx5MgRPUJ1OnvOBcDixYu5\n77776NGjhw5RuoY952LZsmXce++9jY0LYWFheoTqdPaci169enH+/HkAzp8/T/fu3QkM1GXzOKe6\n+eab6dq1q+b9rc2bDkvuR48eJTIysvH7iIgIjh492uwx3pjU7DkXV3rzzTcZP94RVy24H3vfF6tX\nr268utneFlxPY8+5OHDgAGfOnOGWW25h2LBhvP/++64O0yXsORfTpk1j79699O7dm4SEBDIzM10d\npltobd502Mego3rivUFL/k+bNm3irbfe4uuvv3ZiRPqx51w8/vjjvPDCC41bijV9j3gLe85FXV0d\nxcXFfP7551y8eJFRo0YxcuRIYmJiXBCh69hzLp577jkGDx5MXl4eJSUlJCcns3PnTjp27OiCCN1L\na/Kmw5K79MRfZs+5ANi1axfTpk0jJyfH5p9lnsyec/HNN9+QlpYGQFlZGevWrSMoKMiq7dbT2XMu\nIiMjCQsLIzQ0lNDQUBITE9m5c6fXJXd7zkVhYSFz5pg3jTYYDPTr14/9+/czbNgwl8aqt1bnTYfM\nCCiKUldXp/Tv3185ePCgUlNT0+yE6ubNm712EtGec/Hjjz8qBoNB2bx5s05RuoY95+JKkydP9tpu\nGXvOxb59+5Rbb71Vqa+vVy5cuKAMHDhQ2bt3r04RO4895+KJJ55Q5s2bpyiKopw4cUIJDw9XysvL\n9QjX6Q4ePGjXhGpL8qbDRu7SE3+ZPefimWee4ezZs4115qCgIIqKivQM2ynsORe+wp5zERcXR0pK\nCoMGDcLf359p06YxYMAAnSN3PHvOxezZs5kyZQoJCQk0NDTw0ksv0a1bN50jd7z777+f/Px8ysrK\niIyMZP78+dTV1QFty5t+iuKlBU4hhPBhLt2JSQghhGtIchdCCC8kyV0IIbyQJHchhPBCktyFEMIL\nSXIXQggv9P8BcEdRFyfaa+oAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 332 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "So, it sort of works but not giving the same curve as the vanilla method" ] }, {