{"id":224,"date":"2026-02-09T00:18:42","date_gmt":"2026-02-09T00:18:42","guid":{"rendered":"https:\/\/madelinekrajewski.knight.domains\/capstone\/?page_id=224"},"modified":"2026-05-27T21:57:02","modified_gmt":"2026-05-27T21:57:02","slug":"week-15-post","status":"publish","type":"page","link":"https:\/\/madelinekrajewski.knight.domains\/capstone\/blog\/week-15-post\/","title":{"rendered":"Week 15: ASCII and Algorithm 2"},"content":{"rendered":"<h5 class=\"wp-block-heading has-text-align-center\" id=\"madeline-krajewski\">Madeline Krajewski<\/h5>\n\n\n<div class=\"has-text-align-center wp-block-post-date\"><time datetime=\"2026-05-26T14:52:51.703Z\">May 26, 2026<\/time><\/div>\n\n\n<p class=\"wp-block-paragraph\">Now that Algorithm 1 is complete, it is finally time to tackle Algorithm 2! Thankfully, it is not nearly as scary as it seems. I will try to explain the process simplistically to hopefully help others understand it, too. First, we are only making two shares WITHOUT increasing the image size. We are not using any vector modifiers or anything beyond the simplest form of the algorithm. At the suggestion of my Point Professor, Dr. McVey, I will be using ASCII art to start; later, I will make the leap towards images. I would recommend anyone else attempting this project to do the same by using 2D char arrays and text files to store the information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I simplified the process by finding this vector image of a Kiwi (a flightless bird native to New Zealand).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-1.png\" alt=\"\" class=\"wp-image-959\" style=\"width:401px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then, I put it through <a href=\"https:\/\/www.asciiart.eu\/image-to-ascii\">this website, which converts images to ASCII art.<\/a> It outputted the Kiwi with &#8216;@&#8217; symbols, which I later modify. Below is the unedited version of the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"847\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-at-1024x847.png\" alt=\"\" class=\"wp-image-966\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-at-1024x847.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-at-300x248.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-at-768x635.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/kiwi-at.png 1065w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From here, I wrote a quick function which grabbed a char from the text file and checked whether it was an &#8216;@&#8217; symbol. If it was, it wrote an &#8216;X&#8217;; otherwise, it wrote an &#8216;O&#8217;. This then makes the ASCII chars similar to black pixels (&#8216;X&#8217;) and white\/other pixels (&#8216;O&#8217;). With this done, I could then move onto the encoding process.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"842\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/visiblexkiwi-1.png\" alt=\"\" class=\"wp-image-955\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/visiblexkiwi-1.png 695w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/visiblexkiwi-1-248x300.png 248w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, this sounds far more complicated than it is. First, let&#8217;s set up our chart of chars. This models what Doug Stinson outlines in his paper; this (to me) is a bit easier to follow. Basically, we determine if the char is a white char (&#8216;O&#8217;) or a black char (&#8216;X&#8217;). Once you determine which char array to use, you randomize which column to use. From there, you put Row 0 (&#8216;1,&#8217; but computer scientists begin counting from 0) into Share 1, and Row 1 into Share 2. Do this for all the chars in the ASCII art, and voila! You now have two garbled, strange shares! I have highlighted the &#8216;X&#8217; chars to make it a bit easier to see what has occurred.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"377\" height=\"243\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image.png\" alt=\"\" class=\"wp-image-971\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image.png 377w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image-300x193.png 300w\" sizes=\"auto, (max-width: 377px) 100vw, 377px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s Share 1:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"821\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1kiwi.png\" alt=\"\" class=\"wp-image-956\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1kiwi.png 678w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1kiwi-248x300.png 248w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And Here&#8217;s Share 2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"821\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2kiwi.png\" alt=\"\" class=\"wp-image-957\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2kiwi.png 668w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2kiwi-244x300.png 244w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can merge the shares to reveal the secret image! To do this, we simply check if an &#8216;X&#8217; appears in either Share 1 or Share 2. If it does, we write it to the Merged text file. After looping through everything, we have a text file which should reveal the secret image!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s what I got during this run:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"825\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi.png\" alt=\"\" class=\"wp-image-958\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi.png 676w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi-246x300.png 246w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And here it is with an outline to hopefully make it easier to see:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"825\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi-outline.png\" alt=\"\" class=\"wp-image-961\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi-outline.png 676w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/mergekiwi-outline-246x300.png 246w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Success!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here it is again, but with a larger ASCII image of this Grey Crowned Crane:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"550\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/lohrelei-grey-crowned-crane-1394613_640.png\" alt=\"\" class=\"wp-image-980\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/lohrelei-grey-crowned-crane-1394613_640.png 640w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/lohrelei-grey-crowned-crane-1394613_640-300x258.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8216;@&#8217; ASCII from our handy-dandy website:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"1002\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image-1.png\" alt=\"\" class=\"wp-image-981\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image-1.png 840w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image-1-251x300.png 251w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/image-1-768x916.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My &#8216;X &amp; O&#8217; Version (in Notepad, because MS Word did not have a large enough paper size to make it legible as an image):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"405\" height=\"567\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/ascii-crane-xo.png\" alt=\"\" class=\"wp-image-982\" style=\"width:444px;height:auto\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/ascii-crane-xo.png 405w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/ascii-crane-xo-214x300.png 214w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Share 1:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"418\" height=\"572\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1.png\" alt=\"\" class=\"wp-image-985\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1.png 418w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share1-219x300.png 219w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Share 2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"563\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2.png\" alt=\"\" class=\"wp-image-986\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2.png 403w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/share2-215x300.png 215w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And finally, the Merged Shares:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"565\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/merge.png\" alt=\"\" class=\"wp-image-987\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/merge.png 403w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/05\/merge-214x300.png 214w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we can see how much clearer the image turns out when more chars (&#8216;pixels&#8217;) get used. This is something to keep in mind&#8211;the next step will be to increase the size of the original image. Remember how confused I had been regarding doubling the number of pixels? What needs to happen is doubling the <em>dimensions.<\/em> That is, if the original is (width * height), the new, larger version will be ((2* width) * (2*height)). The finish line is in sight, and I can&#8217;t believe I only have one week left!<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Image Sources<\/summary>\n<p class=\"wp-block-paragraph\">&#8220;Grey Crowned Crane&#8221; by <a href=\"https:\/\/pixabay.com\/users\/lohrelei-1422286\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1394613\" target=\"_blank\" rel=\"noreferrer noopener\">Gitti Lohr<\/a> from <a href=\"https:\/\/pixabay.com\/\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1394613\" target=\"_blank\" rel=\"noreferrer noopener\">Pixabay<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;Kiwi Silhouette&#8221; by <a href=\"https:\/\/pixabay.com\/users\/clker-free-vector-images-3736\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=33884\">Clker-Free-Vector-Images<\/a> from <a href=\"https:\/\/pixabay.com\/\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=33884\">Pixabay<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.asciiart.eu\/image-to-ascii\">https:\/\/www.asciiart.eu\/image-to-ascii<\/a><\/p>\n<\/details>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f15824f9 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/blog\/week-14-post\/\">Previous: Week 14<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Madeline Krajewski Now that Algorithm 1 is complete, it is finally time to tackle Algorithm 2! Thankfully, it is not nearly as scary as it seems. I will try to explain the process simplistically to hopefully help others understand it, too. First, we are only making two shares WITHOUT increasing the image size. We are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":88,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-224","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":33,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/224\/revisions"}],"predecessor-version":[{"id":993,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/224\/revisions\/993"}],"up":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/88"}],"wp:attachment":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/media?parent=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}