<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Lakshay</title><link>/</link><description>Notes, experiments and things I&#x27;m learning.</description><item><title>Turning photographs into text</title><link>/writing/text-pictures/</link><guid>/writing/text-pictures/</guid><pubDate>Sun, 18 Oct 2026 12:00:00 +0000</pubDate><description>How a photograph becomes a picture made of letters, and why it behaves like a handful of springs.</description><content:encoded><![CDATA[<p>The butterfly in my text-picture experiments is a photograph. There is no image on the page at all, only letters.</p>
<h3 id="from-pixels-to-characters">From pixels to characters</h3>
<p>The photo is shrunk until each pixel is about the size of one character. Then every pixel is asked one question: how dark are you? Darker pixels get heavier characters, <code>@</code> and <code>#</code>, and lighter ones get <code>:</code> and <code>;</code>. Pixels that are nearly white get nothing, so the paper shows through.</p>
<p>A few things make the difference between a muddy picture and a readable one:</p>
<ul><li><strong>Cut the subject out first.</strong> A busy background turns into noise. A clean cutout turns into paper.</li><li><strong>Boost local contrast.</strong> Push each character away from the average of its neighbours, so edges and veins survive the shrinking.</li><li><strong>Match the cell shape.</strong> Characters are taller than they are wide, so the picture is sampled on a grid of the same shape.</li></ul>
<h3 id="springs">Springs</h3>
<p>Each character is its own little object with a resting place. A spring pulls it home, the pointer pushes it away, and friction settles it again. Hold the pointer down and they scramble between characters of the same weight.</p>
<p>Once in a while one lets go and falls like a petal.</p>
<p>That's all of it. The rest is choosing a good photograph.</p>]]></content:encoded></item><item><title>Hello</title><link>/writing/hello/</link><guid>/writing/hello/</guid><pubDate>Sat, 17 Oct 2026 12:00:00 +0000</pubDate><description>A first post, to see how everything looks.</description><content:encoded><![CDATA[<p>This is the first post. Delete it, or keep it as a place to try things out.</p>
<p>Posts are plain text files in <code>content/posts/</code>. Each one starts with a few lines of details between two rows of dashes, then the post itself.</p>
<h3 id="writing-in-it">Writing in it</h3>
<p>You can use <em>italics</em>, <strong>bold</strong>, and <code>inline code</code>. Links look <a href="https://example.com">like this</a>.</p>
<blockquote><p>A quote sits apart, set in italics.</p></blockquote>
<p>A list:</p>
<ul><li>one thing</li><li>another thing</li><li>a third</li></ul>
<p>And a numbered one:</p>
<ol><li>first</li><li>second</li><li>third</li></ol>
<hr>
<p>When you're ready, run <code>python build.py</code> and the site is rebuilt.</p>]]></content:encoded></item></channel></rss>
