{"id":517,"date":"2018-01-02T00:37:25","date_gmt":"2018-01-02T00:37:25","guid":{"rendered":"http:\/\/perfectionatic.org\/?p=517"},"modified":"2018-01-02T00:37:25","modified_gmt":"2018-01-02T00:37:25","slug":"visualizing-the-inscribed-circle-and-square-puzzle","status":"publish","type":"post","link":"https:\/\/perfectionatic.org\/?p=517","title":{"rendered":"Visualizing the Inscribed Circle and Square Puzzle"},"content":{"rendered":"<p>Recently, I watched a cool <a href=\"https:\/\/www.youtube.com\/watch?v=zmcL1Ut_A_Y\">mind your decsions video<\/a> on an inscribed circle and rectangle puzzle. In the video they showed a diagram that was not scale. I wanted to get a sense of how these differently shaped areas will match.<\/p>\n<p>There was a cool ratio between the outer and inner circle radii that is expressed as<\/p>\n<p>\\(\\frac{R}{r}=\\sqrt{\\frac{\\pi-2}{4-\\pi}} \\).<\/p>\n<p>I used <a href=\"https:\/\/github.com\/GiovineItalia\/Compose.jl\"><code>Compose.jl<\/code><\/a> to rapidly do that.<\/p>\n<pre lang=\"julia\">\nusing Compose\nset_default_graphic_size(20cm, 20cm)\n\u03d5=sqrt((pi -2)\/(4-pi))\nR=10\nr=R\/\u03d5\nctx=context(units=UnitBox(-10, -10, 20, 20))\ncomposition = compose(ctx,\n    (ctx, rectangle(-r\/\u221a2,-r\/\u221a2,r*\u221a2,r*\u221a2),fill(\"white\")),\n    (ctx,circle(0,0,r),fill(\"blue\")),\n    (ctx,circle(0,0,R),fill(\"white\")),\n    (ctx,rectangle(-10,-10,20,20),fill(\"red\")))\ncomposition |> SVG(\"inscribed.svg\")\n<\/pre>\n<p><a href=\"http:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed-300x300.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-523\" srcset=\"https:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed-300x300.png 300w, https:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed-150x150.png 150w, https:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed-50x50.png 50w, https:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed-125x125.png 125w, https:\/\/perfectionatic.org\/wp-content\/uploads\/2018\/01\/inscribed.png 709w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I watched a cool mind your decsions video on an inscribed circle and rectangle puzzle. In the video they showed a diagram that was not scale. I wanted to get a sense of how these differently shaped areas will match. There was a cool ratio between the outer and inner circle radii that is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74,62],"tags":[97,92],"class_list":["post-517","post","type-post","status-publish","format-standard","hentry","category-julia","category-math","tag-compose-jl","tag-julia"],"_links":{"self":[{"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=517"}],"version-history":[{"count":9,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions\/527"}],"wp:attachment":[{"href":"https:\/\/perfectionatic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/perfectionatic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}