{"id":5677,"date":"2015-06-04T15:22:57","date_gmt":"2015-06-04T14:22:57","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=5677"},"modified":"2016-06-13T13:05:35","modified_gmt":"2016-06-13T12:05:35","slug":"interactive-mystery-curve-using-jupyter-notebo","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=5677","title":{"rendered":"Interactive &#8216;Mystery Curve&#8217; using Jupyter notebook"},"content":{"rendered":"<p>The ever-superb John D. Cook <a href=\"http:\/\/www.johndcook.com\/blog\/2015\/06\/03\/mystery-curve\/\">recently found this lovely looking curve<\/a> in a book he&#8217;s currently reading<a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2015\/06\/mystery_curve.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5785\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2015\/06\/mystery_curve.png\" alt=\"mystery_curve\" width=\"429\" height=\"449\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2015\/06\/mystery_curve.png 429w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2015\/06\/mystery_curve-286x300.png 286w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>John posted some Python code that reproduced this curve. I\u00a0<del>stole<\/del> borrowed his code, put it in a Jupyter notebook and wrapped it in an interactive widget to allow me to play with the parameters and see what other curves I could come up with. The result looks like this.<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2015\/06\/Screen-Shot-2015-06-04-at-15.09.26.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5787\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2015\/06\/Screen-Shot-2015-06-04-at-15.09.26.png\" alt=\"Screen Shot 2015-06-04 at 15.09.26\" width=\"622\" height=\"520\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2015\/06\/Screen-Shot-2015-06-04-at-15.09.26.png 1244w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2015\/06\/Screen-Shot-2015-06-04-at-15.09.26-300x250.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2015\/06\/Screen-Shot-2015-06-04-at-15.09.26-1024x856.png 1024w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/a><\/p>\n<p>If you&#8217;d like something where those sliders work, you need to run the notebook I&#8217;ve created in Project Jupyter. Here are 2 ways to do that.<\/p>\n<ul>\n<li><span style=\"line-height: 13px;\"><a href=\"https:\/\/github.com\/mikecroucher\/Jupyter_examples\/blob\/master\/pretty_things\/Mystery%20Curve.ipynb\">Download the notebook from github<\/a><\/span><\/li>\n<li>Method 1: Upload this notebook to <a href=\"https:\/\/try.jupyter.org\/\">Try Jupyter<\/a>.<\/li>\n<li>Method 2: Install <a href=\"http:\/\/continuum.io\/downloads\">Anaconda Python<\/a> on your machine. <a href=\"http:\/\/ipython.org\/ipython-doc\/dev\/notebook\/notebook.html#starting-the-notebook-server\">Launch the notebook<\/a> and open the file downloaded above.<\/li>\n<\/ul>\n<p>Once you have the notebook open, click on <strong>Cell<\/strong>-&gt;<strong>Run All\u00a0<\/strong>and play with the sliders that pop up.<\/p>\n<p>Other posts about these curves:<\/p>\n<ul>\n<li><span style=\"line-height: 13px;\"><a href=\"http:\/\/mathlesstraveled.com\/2015\/06\/04\/random-cyclic-curves-5\/\">Random cyclic curves<\/a> &#8211; Includes code written in Haskell<\/span><\/li>\n<li><a href=\"http:\/\/tube.geogebra.org\/material\/show\/id\/1292585\">A geogebra applet<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The ever-superb John D. Cook recently found this lovely looking curve in a book he&#8217;s currently reading &nbsp; John posted some Python code that reproduced this curve. I\u00a0stole borrowed his code, put it in a Jupyter notebook and wrapped it in an interactive widget to allow me to play with the parameters and see what [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[45,7,31,67,42],"tags":[],"class_list":["post-5677","post","type-post","status-publish","format-standard","hentry","category-just-for-fun","category-programming","category-python","category-scientific-software","category-tutorials"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1tz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5677"}],"version-history":[{"count":7,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5677\/revisions"}],"predecessor-version":[{"id":6137,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5677\/revisions\/6137"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}