{"id":479,"date":"2012-01-30T16:03:32","date_gmt":"2012-01-30T16:03:32","guid":{"rendered":"https:\/\/eod.brianstandley.com\/?page_id=479"},"modified":"2013-06-02T05:39:21","modified_gmt":"2013-06-02T12:39:21","slug":"cookie-math","status":"publish","type":"page","link":"https:\/\/eveofdiscovery.com\/index.php\/blog\/cookie-math\/","title":{"rendered":"Cookie math"},"content":{"rendered":"<p>This page contains all the math behind the post &#8220;<a href=\"\/index.php\/2012\/01\/cookie-calculations\/\" title=\"Cookie calculations\">Cookie calculations<\/a>.&#8221;<\/p>\n<h2>Calculation of lattice cookie density<\/h2>\n<p>To compare the ideal efficiency of different arrangements, we can look at each lattice&#8217;s representative &#8220;unit cell&#8221; &#8212; i.e., the shape that is repeated in the pattern:<\/p>\n<div class=\"figure\" style=\"width: 400px;\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2012\/01\/unitcells.png\" alt=\"unit cells\" \/><\/div>\n<p>In a square lattice, each of the squares holds four cookie quarters, one in each corner, for a total of one cookie.  The square takes up an area <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-5a0fa337d9deccfcb20a5a1a725f8662_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#99;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"15\" style=\"vertical-align: 0px;\"\/>, where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-38d7a0a4332379ab76f2a27910edb7fe_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"8\" style=\"vertical-align: 0px;\"\/> is the distance between cookie centers.  So the \u201ccookie density\u201d is:<\/p>\n<p align=center>(1 cookie per square)\/(area of the square) = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-387c787edfd20cf7e907930934e7deb4_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#49;&#47;&#99;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"32\" style=\"vertical-align: -5px;\"\/><\/p>\n<p>Each triangle in the triangular lattice, meanwhile, holds three sixths of a cookie (for a total of one half cookie) and takes up area (1\/2)(base)(height) = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-0a098ad26c1d18c4ac99c55eafd79ccc_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#49;&#47;&#50;&#41;&#40;&#99;&#41;&#40;&#92;&#115;&#113;&#114;&#116;&#51;&#32;&#99;&#47;&#50;&#41;&#32;&#61;&#32;&#46;&#52;&#51;&#51;&#99;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"194\" style=\"vertical-align: -5px;\"\/>.  So its cookie density is:<\/p>\n<p align=center>(1\/2 cookie per triangle)\/(area of the triangle) = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-1f12c95dd978d739ef8b115140a0ee16_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#46;&#53;&#47;&#40;&#46;&#52;&#51;&#51;&#99;&#94;&#50;&#41;&#32;&#61;&#32;&#49;&#46;&#49;&#53;&#47;&#99;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"162\" style=\"vertical-align: -5px;\"\/><\/p>\n<p>Alternately, to calculate what percent of the area is taken up by cookies (rather than the space between them), divide the area of cookie in the unit cell by the total unit cell area.  (This is equivalent to multiplying the area of a cookie by the cookie density.)  When the cookies are touching, the radius of a cookie equals c\/2, so the area is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-50e4d18b1699090ef0cfe9f77261fb88_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#112;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/>(radius)<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-ac663ae72a75b3b55b25beb262bc61a0_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"7\" style=\"vertical-align: 6px;\"\/> = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-df91502131df4734cfe0e8252f6fe608_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#112;&#105;&#32;&#99;&#94;&#50;&#32;&#47;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"44\" style=\"vertical-align: -5px;\"\/>.<\/p>\n<p align=center>square unit cell: <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-75d7f38c1419f696fc89cd5e834cf3dc_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#92;&#112;&#105;&#32;&#99;&#94;&#50;&#32;&#47;&#52;&#41;&#47;&#40;&#99;&#94;&#50;&#41;&#32;&#61;&#32;&#55;&#56;&#46;&#53;&#32;&#92;&#37;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"164\" style=\"vertical-align: -5px;\"\/><\/p>\n<p align=center>triangular unit cell: <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-2fe8d00a63a0c1e60fff553563f26c49_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#92;&#112;&#105;&#32;&#99;&#94;&#50;&#32;&#47;&#56;&#41;&#47;&#40;&#46;&#52;&#51;&#51;&#99;&#94;&#50;&#41;&#32;&#61;&#32;&#57;&#48;&#46;&#55;&#32;&#92;&#37;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"196\" style=\"vertical-align: -5px;\"\/><\/p>\n<p>Those are the theoretical values.  When you have boundaries, however, the cookie density at the edges is lower due to there being extra space there (but not enough extra space to fit another cookie).  The only time the density reaches the theoretical value is for a square lattice on a cookie sheet that&#8217;s an exact number of cookies in both dimensions.  Here is a graph showing how cookie coverage depends on width, when the length is 4.0 cookies:<\/p>\n<div class=\"figure\" style=\"width: 600px;\"><a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq4.0.png\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq4.0.png\" alt=\"cookie density (length = 4.0 cookies)\" \/><\/a>The square lattice hits its theoretical value at integer values of width; in between, the density drops off as the cookie sheet area increases while the number of cookies that fit stays the same.  The triangular lattice is well below its theoretical value, but does asymptote toward a higher value than the square lattice does, in the limit of very large width.<\/div>\n<p>When the width is <a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq3.5.png\">3.5<\/a> or <a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq4.5.png\">4.5<\/a> cookies, the triangular lattice always has an equal or higher density than the square lattice.  Lattice densities are both much lower than they would be without boundaries.<\/p>\n<p>For smaller cookies or larger cookie sheets (<a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq9.5.png\">9.5<\/a> cookies long, <a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq10.0.png\">10.0<\/a> cookies long), the densities are larger.  This is due to the decrease in the perimeter:area ratio (the 2D equivalent of a surface area: volume ratio).  Only for very large cookie sheets (<a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq99.5.png\">99.5<\/a> cookies long, <a href=\"\/wp-content\/uploads\/2012\/01\/graphdensity_leq100.0.png\">100.0<\/a> cookies long), does the density of the triangular lattice seem to really approach that ideal 90.7%.<\/p>\n<h2>Long-term behavior with unlimited width<\/h2>\n<p>We&#8217;ve seen that the best lattice to use <a href=\"\/wp-content\/uploads\/2012\/01\/graph_leq4.0.png\">flips back and forth between square and triangular<\/a> when the dimensions of the cookie sheet are small.  (This is when you have a set length, and are looking at what happens for different widths.)  But does one or the other win out at larger widths?  To figure this out, consider the average rate at which cookies are added with increasing width &#8212; i.e., the average steepness of the stepped incline.<\/p>\n<p>The steepness of the step function for a square lattice with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-a63eb5ff0272d3119fa684be6e7acce8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> cookies per row is:<\/p>\n<p align=center>(cookies per row)\/(distance between rows) = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-0c5e4bc5190ae3ac7628b1da255f7022_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;&#47;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"28\" style=\"vertical-align: -5px;\"\/> = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-a63eb5ff0272d3119fa684be6e7acce8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>The steepness of the step function for an triangular lattice with <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-a63eb5ff0272d3119fa684be6e7acce8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> cookies in the first row but <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-389d9382094c755e17fd35d6aae92a83_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;&#32;&#45;&#32;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"40\" style=\"vertical-align: -1px;\"\/> in the second (then <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-a63eb5ff0272d3119fa684be6e7acce8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> in the third, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-389d9382094c755e17fd35d6aae92a83_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;&#32;&#45;&#32;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"40\" style=\"vertical-align: -1px;\"\/> in the fourth, and so on . . .) is:<\/p>\n<p align=center>(average cookies per row)\/(distance between rows) = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-b4837158b776b2d116426573518b104a_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#110;&#32;&#45;&#32;&#46;&#53;&#41;&#47;&#40;&#92;&#115;&#113;&#114;&#116;&#51;&#32;&#47;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"122\" style=\"vertical-align: -5px;\"\/> = <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-a0240e52fc344e3efa8717f27198fb75_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#110;&#32;&#45;&#32;&#46;&#53;&#41;&#47;&#46;&#56;&#56;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"100\" style=\"vertical-align: -5px;\"\/><\/p>\n<p>With a wide enough cookie sheet, triangular lattices will will out despite having one fewer cookie in every other row when:<\/p>\n<p align=center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-d5a4f6835e1136d8647f86c936b4433b_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#40;&#110;&#32;&#45;&#32;&#46;&#53;&#41;&#47;&#46;&#56;&#56;&#54;&#32;&#62;&#32;&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"134\" style=\"vertical-align: -5px;\"\/><\/p>\n<p align=center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-9078d62839f2ee6892a0ff34c3d33cfe_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#46;&#49;&#53;&#53;&#110;&#32;&#62;&#32;&#46;&#53;&#55;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"97\" style=\"vertical-align: -1px;\"\/><\/p>\n<p align=center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-3593e558e70ed511fb77747a4a86c4fe_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;&#32;&#62;&#32;&#51;&#46;&#55;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"66\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>That means that a triangular lattice with rows of 4-3-4-3-4&#8230; will ultimately, once you get above some threshold width, always be more efficient than an square lattice with 4 in every row.  But a triangular lattice with rows of 3-2-3-2-3&#8230; will ultimately always be less efficient than a square lattice with 3 in every row.<\/p>\n<p>This definitely falls into the category of &#8220;curiosity&#8221; rather than &#8220;useful fact,&#8221; though (even more so than the rest of this exercise), since the &#8220;thresholds&#8221; in question are quite large (<a href=\"\/wp-content\/uploads\/2012\/01\/graph_leq4.0_limit.png\">91 cookies wide<\/a> and <a href=\"\/wp-content\/uploads\/2012\/01\/graph_leq3.0_limit.png\">27 cookies wide<\/a>, respectively).  So for any sizes of interest, whether a square lattice or a triangular lattice is better depends on the specific width of the pan.<\/p>\n<h2>Equation for the number of cookies that fit on a cookie sheet<\/h2>\n<p>First, for the sake of absolute clarity, let&#8217;s explicitly define the variables:<\/p>\n<ul>\n<li>L = cookie sheet length (measured in the units of your choice &#8212; inches, cm, furlongs, light-years, etc)<\/li>\n<li>W = cookie sheet width (measured in the same units as length)<\/li>\n<li>C = distance between cookie centers (measured in the same units as length and width)<\/li>\n<\/ul>\n<p>Next, we can simplify to two variables with dimensionless units:<\/p>\n<p align=center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-78d46af3f19bae0d88ac0cabd450a296_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#119;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"13\" style=\"vertical-align: 0px;\"\/> = W\/C = width measured in cookies<\/p>\n<p align=center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-874263a7b361610077e947dd8ffbfa84_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#108;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"5\" style=\"vertical-align: 0px;\"\/> = L\/C = length measured in cookies<\/p>\n<p>Finally, I should explain that I&#8217;ll be using two somewhat uncommon functions:<\/p>\n<ol>\n<li>The <em>floor<\/em> function, written as <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-32f14bd6abbbca8cf8d728675d87dede_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#120;&#92;&#114;&#102;&#108;&#111;&#111;&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"20\" style=\"vertical-align: -5px;\"\/> when operating on the variable <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-1b9fbfb207b6d17d74b33c6d8342a1a4_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/>, is a mathematical function that rounds a real number down to the nearest integer.  (So long as you&#8217;re dealing with positive numbers, it&#8217;s the same as just dropping whatever is to the right of the decimal point.)<\/li>\n<li>The <em>modulo<\/em> function, written <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-67d01767032811524bbe34b198a98a90_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#97;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"61\" style=\"vertical-align: 0px;\"\/> for variables <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-c63f5a3a084d567b6d62758d1c9bc8b8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-173b5c22c5ff048f406b49d642c938f4_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"8\" style=\"vertical-align: 0px;\"\/>, gives the remainder when you divide <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-c63f5a3a084d567b6d62758d1c9bc8b8_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-173b5c22c5ff048f406b49d642c938f4_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#98;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"8\" style=\"vertical-align: 0px;\"\/>.  For example, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-ec65d7e7703166836a1886e591cf858b_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#49;&#50;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#52;&#32;&#61;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"102\" style=\"vertical-align: -1px;\"\/> (because 4 goes into 12 evenly), <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-fd966a3158047721067492a85e35d20b_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#49;&#50;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#53;&#32;&#61;&#32;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"101\" style=\"vertical-align: -1px;\"\/>, and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-f67164860e0326324528c116f93e5257_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#49;&#50;&#46;&#53;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#49;&#32;&#61;&#32;&#46;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"120\" style=\"vertical-align: -1px;\"\/>.\n<\/ol>\n<p>That done, it&#8217;s quite simple to calculate the number of cookies in the largest square lattice that will fit on the cookie sheet.  Just round the length and width down to the nearest integer, and multiply them together:<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-abfd84360bc4a25420ec876857a3c88f_l3.png\" height=\"19\" width=\"137\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#111;&#107;&#105;&#101;&#115;&#125;&#95;&#123;&#92;&#98;&#108;&#97;&#99;&#107;&#115;&#113;&#117;&#97;&#114;&#101;&#125;&#32;&#61;&#32;&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#108;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#32;&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#119;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#32; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>Triangular lattices are a bit more complicated, and most easily defined piece-wise:<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 64px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-957963bf913743bfe456dd8332858293_l3.png\" height=\"64\" width=\"526\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#116;&#101;&#120;&#116;&#123;&#99;&#111;&#111;&#107;&#105;&#101;&#115;&#125;&#95;&#123;&#92;&#98;&#108;&#97;&#99;&#107;&#116;&#114;&#105;&#97;&#110;&#103;&#108;&#101;&#125;&#32;&#61;&#32;&#92;&#108;&#101;&#102;&#116;&#92;&#123; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#114;&#114;&#97;&#121;&#125;&#123;&#108;&#108;&#125; &#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#108;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#32;&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#38;&#32;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#105;&#102;&#32;&#125;&#32;&#108;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#49;&#32;&#92;&#103;&#101;&#32;&#46;&#53;&#32;&#92;&#92; &#40;&#50;&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#108;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#45;&#49;&#41;&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#47;&#50;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#38;&#32;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#105;&#102;&#32;&#125;&#32;&#108;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#49;&#32;&#60;&#32;&#46;&#53;&#44;&#32;&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#32;&#101;&#118;&#101;&#110;&#125;&#32;&#92;&#92; &#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#108;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#32;&#43;&#32;&#40;&#50;&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#108;&#92;&#114;&#102;&#108;&#111;&#111;&#114;&#45;&#49;&#41;&#40;&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#45;&#49;&#41;&#47;&#50;&#32;&#38;&#32;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#105;&#102;&#32;&#125;&#32;&#108;&#32;&#92;&#98;&#109;&#111;&#100;&#32;&#49;&#32;&#60;&#32;&#46;&#53;&#44;&#32;&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#32;&#111;&#100;&#100;&#125; &#92;&#101;&#110;&#100;&#123;&#97;&#114;&#114;&#97;&#121;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#46; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eveofdiscovery.com\/wp-content\/ql-cache\/quicklatex.com-cf0fdd05353055c90a887c22b6787555_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#110;&#95;&#123;&#99;&#111;&#108;&#125;&#32;&#61;&#32;&#92;&#108;&#102;&#108;&#111;&#111;&#114;&#32;&#49;&#43;&#50;&#40;&#119;&#45;&#49;&#41;&#47;&#92;&#115;&#113;&#114;&#116;&#51;&#32;&#92;&#114;&#102;&#108;&#111;&#111;&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"194\" style=\"vertical-align: -5px;\"\/> is the number of columns that can fit in the width of the sheet.<\/p>\n<p>(This is for a triangular lattice lined up with the length of the cookie sheet, rather the width &#8212; the one I dubbed &#8220;triangular 1.&#8221;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This page contains all the math behind the post &#8220;Cookie calculations.&#8221; Calculation of lattice cookie density To compare the ideal efficiency of different arrangements, we can look at each lattice&#8217;s representative &#8220;unit cell&#8221; &#8212; i.e., the shape that is repeated &hellip; <a href=\"https:\/\/eveofdiscovery.com\/index.php\/blog\/cookie-math\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":8,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-479","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/pages\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":1,"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/pages\/479\/revisions"}],"predecessor-version":[{"id":480,"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/pages\/479\/revisions\/480"}],"up":[{"embeddable":true,"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/eveofdiscovery.com\/index.php\/wp-json\/wp\/v2\/media?parent=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}