<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Daniel D. Johnson (Posts about glsl)</title><link>https://www.danieldjohnson.com/</link><description></description><atom:link href="https://www.danieldjohnson.com/categories/glsl.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:daniel.dw.johnson@gmail.com"&gt;Daniel D. Johnson&lt;/a&gt; </copyright><lastBuildDate>Mon, 01 Sep 2025 09:09:05 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Augmented Shanahan: Extrapolation</title><link>https://www.danieldjohnson.com/2015/01/23/augmented-shanahan-extrapolation/</link><dc:creator>Daniel D. Johnson</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;em&gt;This is the second part of a three-part writeup on my augmented Shanahan project. You may want to start with &lt;a href="https://www.danieldjohnson.com/2015/01/23/augmented-shanahan-detection/"&gt;part one&lt;/a&gt;. For some background math, you may also want to read the post about my &lt;a href="https://www.danieldjohnson.com/2014/11/18/a-tale-of-two-hackathons-part-2-augmented-reality-snake/"&gt;5C Hackathon entry&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;From the detection and tracking algorithms, I was able to generate a 2D perspective transformation matrix that mapped coordinates on the wall to pixels in the image. In order to do 3D rendering, however, I needed a 3D transformation matrix. The algorithm I ended up using is based on &lt;a href="http://dsp.stackexchange.com/questions/2736/step-by-step-camera-pose-estimation-for-visual-tracking-and-planar-markers"&gt;this post&lt;/a&gt; on Stack Exchange, &lt;a href="https://gist.github.com/740979/97f54a63eb5f61f8f2eb578d60eb44839556ff3f"&gt;this gist&lt;/a&gt; on GitHub, and &lt;a href="https://en.wikipedia.org/wiki/Camera_resectioning"&gt;this Wikipedia page&lt;/a&gt;. I will attempt to describe how the algorithm works in the rest of this post.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.danieldjohnson.com/2015/01/23/augmented-shanahan-extrapolation/"&gt;Read more…&lt;/a&gt; (6 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>computer vision</category><category>glsl</category><category>math</category><category>project writeup</category><category>three.js</category><category>Uncategorized</category><guid>https://www.danieldjohnson.com/2015/01/23/augmented-shanahan-extrapolation/</guid><pubDate>Fri, 23 Jan 2015 15:29:01 GMT</pubDate></item><item><title>Infinite Triangles</title><link>https://www.danieldjohnson.com/2014/06/30/infinite-triangles/</link><dc:creator>Daniel D. Johnson</dc:creator><description>&lt;div&gt;&lt;p&gt;This experiment was one of my first experiments with WebGL. The story behind this one starts with a camping trip I took with some friends. We didn't camp in the wilderness because of logistical issues, so we ended up camping close to a beach. On the beach, people started to build sand sculptures, so I began working on a Sierpinski-esque triangle design, but with recursion in the inner triangle as well. Ultimately, a few other people ended up working on the increasingly intricate design. After the camping trip ended, the triangular fractals (affectionately called "tringles" by my friend Sarah) became a sort of running joke and obsession, and we ended up doodling them all over the place. Eventually I decided to make a version with code that would be infinite.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.danieldjohnson.com/2014/06/30/infinite-triangles/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>art</category><category>Experiments</category><category>fractal</category><category>GLOW</category><category>glsl</category><category>WebGL</category><guid>https://www.danieldjohnson.com/2014/06/30/infinite-triangles/</guid><pubDate>Mon, 30 Jun 2014 04:54:31 GMT</pubDate></item></channel></rss>