<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Zan Armstrong</title>
    <description>Writing about 10 weeks of the School for Poetic Computation.</description>
    <link>http://sfpc.zanarmstrong.com</link>
    <atom:link href="http://sfpc.zanarmstrong.com/feed.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title>Slinkies and Amplification</title>
        <description>&lt;p&gt;A friend at school attached a slinky to a box today for part of a project. The best part was that the box worked as a surprisingly good amplifier. It was fun to see how fundamentally simple amplification actually is… and to enjoy the great sounds a slinky can make. Evidently it’s pretty similar to how they created &lt;a href=&quot;https://www.youtube.com/watch?v=aTbtHVFyKoQ&amp;amp;feature=youtu.be&amp;amp;t=1m41s&quot;&gt;the Star Wars blasters sounds&lt;/a&gt;!&lt;/p&gt;
</description>
        <pubDate>Tue, 02 Dec 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Slinkies%20and%20Amplification/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Slinkies%20and%20Amplification/</guid>
      </item>
    
      <item>
        <title>Opening a link from a data visualization</title>
        <description>&lt;p&gt;Love that &lt;a href=&quot;https://github.com/sarahgp/cuny-examples&quot;&gt;Sarah’s D3 scatterplot example&lt;/a&gt; shows how easy it is to click to open a relevant URL from within a data visualization.  The scatterplot shows some meta data about Van Gogh’s paintings, and if you click on the dot you’re redirected to an image search result for that painting.  The visualization was designed as a tutorial rather than a finished work in order to demonstrate some of what is possible with D3, the internet, and dataviz.  &lt;/p&gt;

&lt;p&gt;The relevant snippet is: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;.on(&#39;click&#39;, function(d){
        window.open(&#39;https://www.google.com/search?site=imghp&amp;amp;tbm=isch&amp;amp;q=van+gogh+&#39;+d.Title);
});&lt;/code&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 02 Dec 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Opening%20a%20link/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Opening%20a%20link/</guid>
      </item>
    
      <item>
        <title>Wearables Conversation with David Jay and Maddy Maxie</title>
        <description>&lt;p&gt;I was super honored to welcome David Jay and Maddy Maxie to SFPC today for a conversation about wearable technology. &lt;/p&gt;

&lt;p&gt;Maddy Maxey is CTO at The Crated, a product development studio and consultancy focused on wearable tech, enhanced apparel and computational design.&lt;/p&gt;

&lt;p&gt;David is co-leading a smartwatch team at the Samsung Accelerator, exploring ways to push the bounds of wearable interfaces.&lt;/p&gt;

&lt;p&gt;They’re also both wonderful people, who take a thoughtful and nuanced approach to everything they do. I enjoy conversations with them and the questions they ask. So, it was so nice to have them come visit the school and be able to welcome them to our community.  &lt;/p&gt;

&lt;p&gt;The event went well. They started with short introductions, a bit about why they are intersted in this space, and then we broke into two smaller groups to talk about what we might want to create in the wearables space. The smaller group conversation seemed to make it easier to bring out everyone’s voice, in a way that is harder when we’re having one big conversation.  Afterwards we came back together as a large group. The goal was to talk about how we could get our own hands dirty and what next steps might be. But I think that most of us were still struggling to think about what potential wearables offer and what problems they could solve/needs they could meet, and weren’t quite ready to think about what our next steps might be. So, that will remain for another day. Instead someone asked what made them excited about wearables and I asked what they worried about. I really enjoyed seeing their curiosity and sense of possibility balanced with concerns about the challenges, and they’re interest in addressing those challenges in their own work. &lt;/p&gt;

&lt;p&gt;Thanks to Maddy &amp;amp; David for joining us!&lt;/p&gt;

</description>
        <pubDate>Mon, 01 Dec 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Wearables/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Wearables/</guid>
      </item>
    
      <item>
        <title>Everything is Better with Explosions in the Sky music</title>
        <description>&lt;p&gt;Today I watched &lt;a href=&quot;https://www.youtube.com/watch?v=ha9LA3rYD9g#t=441&quot;&gt;a great video of Amanda Cox’s keynote at OpenVis&lt;/a&gt; a few years ago.  In it she said jokingly that everything looks good with “Explosions in the Sky” music playing in the background, even black and white boxes. :) &lt;/p&gt;

&lt;p&gt;I was feeling playful, and thought it would be fun to &lt;a href=&quot;http://bl.ocks.org/zanarmstrong/raw/00aeeb7079ff8a936d07/&quot;&gt;test this theory&lt;/a&gt;. It’s totally true! Code &lt;a href=&quot;http://bl.ocks.org/zanarmstrong/00aeeb7079ff8a936d07&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Mon, 01 Dec 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Everything%20is%20Better%20with%20Explosions%20in%20the%20Sky%20music/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Everything%20is%20Better%20with%20Explosions%20in%20the%20Sky%20music/</guid>
      </item>
    
      <item>
        <title>Continuing Experimenting with Reordering Pixels</title>
        <description>&lt;p&gt;Continuing from where I left off in the &lt;a href=&quot;http://sfpc.zanarmstrong.com/Reordering%20Pixels/&quot;&gt;Reordering Pixels post&lt;/a&gt;, I’ve now added color!  &lt;/p&gt;

&lt;p&gt;Code is &lt;a href=&quot;https://github.com/zanarmstrong/open-frameworks-sketches/tree/master/reorderPixels/reorderPixelsCameraColored&quot;&gt;here&lt;/a&gt; before I sorted by color and &lt;a href=&quot;https://github.com/zanarmstrong/open-frameworks-sketches/tree/master/reorderPixels/ArrayStructure&quot;&gt;here&lt;/a&gt; with sort by Brightness.  With a small change, I can sort by Hue instead. I’m also experimenting with vectors and arrays to see which is faster, and trying to see if having a separate color object with getHue/getBrightness functions might help. But, I think that might just be repeating what the ofColor object already does. &lt;/p&gt;

&lt;p&gt;Also, now it’s responding to input from the computer’s camera instead of uploading still images. &lt;/p&gt;

&lt;p&gt;With color, but in the corner and without sorting the colors. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_OleJIJ3ubk7_p.232391_1417040748281_Screen%20Shot%202014-11-24%20at%205.57.20%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;With color, sorting by brightness. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_OleJIJ3ubk7_p.232391_1417040766596_Screen%20Shot%202014-11-24%20at%206.36.12%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;With color, sorting by brightness, in center.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_OleJIJ3ubk7_p.232391_1417040789025_Screen%20Shot%202014-11-24%20at%206.40.19%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you have a Mac, you can use the app yourself.  Download it &lt;a href=&quot;https://www.dropbox.com/s/9mywudfre8vz3bw/loadImageIn.zip?dl=0&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 26 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Continuing%20Experiments%20Reordering%20Pixels/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Continuing%20Experiments%20Reordering%20Pixels/</guid>
      </item>
    
      <item>
        <title>Getting Data from Ballet Movements</title>
        <description>&lt;p&gt;&lt;a href=&quot;http://blog.arduino.cc/2014/11/05/e-traces-creates-visual-sensations-from-ballerinas/&quot;&gt;This&lt;/a&gt; is cool.  &lt;/p&gt;
</description>
        <pubDate>Tue, 25 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Getting%20Data%20from%20Ballet%20Movements/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Getting%20Data%20from%20Ballet%20Movements/</guid>
      </item>
    
      <item>
        <title>Three Dimensions in Open Frameworks</title>
        <description>&lt;p&gt;Playing with 3-D in Open Frameworks, and using nodes.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=Lvn_2qzBppo&amp;amp;feature=youtu.be&quot;&gt;Video&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 24 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Three%20Dimensions%20in%20Open%20Frameworks/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Three%20Dimensions%20in%20Open%20Frameworks/</guid>
      </item>
    
      <item>
        <title>Reordering Pixels</title>
        <description>&lt;p&gt;I played with reordering pixels in an image based on their brightness or color. It’s not particularly novel, but I thought it would be fun. &lt;/p&gt;

&lt;p&gt;I started with black/white/grey images since ordering on a greyscale is straightforward while ordering color is not. &lt;/p&gt;

&lt;p&gt;The first attempt reordered horizontally, as shown below and in the code &lt;a href=&quot;https://github.com/zanarmstrong/open-frameworks-sketches/tree/master/reorderGreyPiexles&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-O-JjIy74UHo/VHEFjlAkUHI/AAAAAAAAaEA/R9rlqHvLiAo/w1118-h385-no/Screen%2BShot%2B2014-11-22%2Bat%2B4.51.47%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh3.googleusercontent.com/-t3H27xqO6gw/VHEF-FA1qyI/AAAAAAAAaEQ/3-P-TJUBHr0/w922-h460-no/Screen%2BShot%2B2014-11-22%2Bat%2B4.53.39%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;However, I thought a circle would be more appealing. Implementing this was non-trivial, as I had to figure out how to assign the ordered colors into a spiral in the final image. &lt;/p&gt;

&lt;p&gt;It was tempting to try to figure out how to map the i&lt;sup&gt;th&lt;/sup&gt; color in the ordered color list to some particular x/y coordinate in the final image. Instead, I ended up ordering the x/y coordinate pairs in the final image based on “spiral order.” Then I used a for loop to go through the color list and assign each color to the matching element in the sorted vector of x-y pairs. This way I never needed to figure out a mapping to a particular pixel, but rather just match up each color and pixel in order. &lt;/p&gt;

&lt;p&gt;This code shows how I created and walked through the color list. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;em&amp;gt;vector &amp;lt;int&amp;gt; colors;

for (int i = 0; i &amp;lt; width * height; i++){
    colors.push_back(pixOrig[i]);
}

ofSort(colors);

// create a vector of all pixels, and sort them by spiral order from center
vector &amp;lt;ofVec2f&amp;gt; coords;

for (int i = 0; i &amp;lt; width; i++){
    for (int j = 0; j &amp;lt; height; j++){
        // redefine coordinates from center for sorting, note the offset needed for the center
        coords.push_back(ofVec2f(float(i) - width / 2,float(j) - height / 2));
    }
}

// sort the ordered pairs of pixels into a spiral, using function declared above
ofSort(coords, orderPixels);

// walk through the vector of ordered pixels and assign colors in order
for (int i = 0; i &amp;lt; colors.size(); i++){
    ofVec2f k = coords[i];
    pixFinal[int((k.y + height/2) * width + (k.x + width/2))] = colors[i];
}&amp;lt;/em&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And, this is the sorting function “orderPixels” which was used to sort the vector of ordered pairs of coordinates. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bool ofApp::orderPixels(ofVec2f a, ofVec2f b){
// goal: return true if a &amp;gt; b

// check if radius a is larger than radius b, using pythagorian theorem
if(sqrt(a.x * a.x + a.y * a.y) &amp;gt; sqrt(b.x * b.x + b.y * b.y) + 1){
    return true;
//check if radius b is larger than radius a
} else if (sqrt(a.x * a.x + a.y * a.y) + 1 &amp;lt; sqrt(b.x * b.x + b.y * b.y)){
    return false;
// if the radius is within 1, check the angles
} else {
    // both points below midpoint?
    if(a.y &amp;lt; 0 and b.y &amp;lt; 0){
        // and further left?
        if(a.x &amp;lt; b.x){
            return true;
        } else {
            return false;
        }
    // both points above midpoint?
    } else if(a.y &amp;gt; 0 and b.y &amp;gt; 0){
        // and further right?
        if(a.x &amp;gt; b.x){
            return true;
        } else {
            return false;
        }
    // one point above midpoint, and the other below?
    } else if(a.y &amp;gt; b.y){
        return true;
    } else {
        return false;
    }
} }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The rest of the code is &lt;a href=&quot;https://github.com/zanarmstrong/open-frameworks-sketches/tree/master/reorderGreyPixelsCircle&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The result is this: &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh3.googleusercontent.com/-M-EDQtc9N24/VHJvfQjlXwI/AAAAAAAAaGc/s0VsfkpK-lc/w917-h457-no/Screen%2BShot%2B2014-11-23%2Bat%2B6.29.52%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh6.googleusercontent.com/-LKXKKdH6scg/VHJvftUKipI/AAAAAAAAaGo/nm7HJStBhZ0/w1118-h384-no/Screen%2BShot%2B2014-11-23%2Bat%2B6.30.17%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh3.googleusercontent.com/-okMJ1TvFrxc/VHKkD8Q03lI/AAAAAAAAaH4/i0gno38c-cA/w1117-h413-no/Screen%2BShot%2B2014-11-23%2Bat%2B10.18.46%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh5.googleusercontent.com/-CbQMqWkkjWg/VHKkD-6yzfI/AAAAAAAAaH0/8L3s4iwtfY0/w986-h300-no/Screen%2BShot%2B2014-11-23%2Bat%2B10.19.48%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I also played with reversing the order: &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh3.googleusercontent.com/-ZnjmtmMnAv4/VHKoCXJA70I/AAAAAAAAaIQ/S3MoyGv6TfY/w986-h304-no/Screen%2BShot%2B2014-11-23%2Bat%2B10.36.15%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-Lm6b0kdSHTQ/VHKoClwwCBI/AAAAAAAAaIc/bhYY4kQMYrI/w921-h462-no/Screen%2BShot%2B2014-11-23%2Bat%2B10.36.56%2BPM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next up will be &lt;a href=&quot;http://sfpc.zanarmstrong.com/Continuing%20Experiments%20Reordering%20Pixels/&quot;&gt;defining functions to order color&lt;/a&gt;. This harkens back in a way to the &lt;a href=&quot;http://bl.ocks.org/zanarmstrong/raw/c0f07275634de1f12769/&quot;&gt;color interpolation tests I did in D3/JS&lt;/a&gt; last year.  &lt;/p&gt;

</description>
        <pubDate>Sun, 23 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Reordering%20Pixels/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Reordering%20Pixels/</guid>
      </item>
    
      <item>
        <title>LEDs, Chess, and Connected Components</title>
        <description>&lt;p&gt;Just a few of the things from the last few days…&lt;/p&gt;

&lt;p&gt;Nathan Teaching Chess
&lt;img src=&quot;https://lh3.googleusercontent.com/-tkdTRe79Fag/VG-t38UJHtI/AAAAAAAAaAI/6wTgIXSJzwM/w1103-h621-no/IMG_20141121_162935823.jpg&quot; alt=&quot;Learning Chess&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The team getting ready for the Silent Barn event with kids gave me a chance to make a rainbox with LED lightning in the clouds. The lights blink different colors.Super fun!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-UMwBQWDwYhc/VG_EEQLAheI/AAAAAAAAaDM/l6SileMigk4/w1103-h621-no/IMG_20141121_180433755.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Paige made an amazing hair accessory!
&lt;img src=&quot;https://lh6.googleusercontent.com/-OJrm6gNIUEc/VG_NxxUJm5I/AAAAAAAAaCQ/l__9IRg_rdQ/w350-h621-no/IMG_20141121_184619354.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Meanwhile, over in Open Framewors, I figured out how to count the connected white components in an image, like the one of the left, and color each component a different color, as shown on the right.  Code is &lt;a href=&quot;https://www.dropbox.com/s/umt667t68el1gb0/connectedComponents.zip?dl=0&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh5.googleusercontent.com/-mPwHs1IGw0w/VHA_TnVGTYI/AAAAAAAAaDk/JIjCAPPC8so/w1047-h621-no/Screen%2BShot%2B2014-11-21%2Bat%2B1.14.01%2BAM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Fri, 21 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/LEDs,%20Chess,%20and%20Connected%20Components/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/LEDs,%20Chess,%20and%20Connected%20Components/</guid>
      </item>
    
      <item>
        <title>Synthesizing Images Part II</title>
        <description>&lt;p&gt;Continuing on the path of Sythesizing images, this time using noise functions to help make it look more organic.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_Sj61nBYJxjG_p.232391_1416330395405_Screen%20Shot%202014-11-18%20at%2011.24.44%20AM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_Sj61nBYJxjG_p.232391_1416330591308_Screen%20Shot%202014-11-18%20at%2012.09.17%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Code snippet: &lt;/p&gt;

&lt;p&gt;int val = ofNoise( i / 50.0, j / 50.0) * ofNoise( i / 500.0, j / 500.0) * 2000 + 1;
            if(rand() % val &amp;lt; 2) {
                        pixels[ (int)(j * w + i)] = 255 - rand() % 200;
                        } else {
                        pixels[ (int)(j * w + i)] = 0;
}&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_Sj61nBYJxjG_p.232391_1416336453011_Screen%20Shot%202014-11-18%20at%201.45.38%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://dchtm6r471mui.cloudfront.net/hackpad.com_Sj61nBYJxjG_p.232391_1416336453000_Screen%20Shot%202014-11-18%20at%201.46.43%20PM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Code snippet: 
            int val = ofNoise( i / 200.0, j / 200.0) * ofNoise( i / 100.0, j / 100.0) * 2000 + 1;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;            if(rand() % val &amp;lt; 2) {
                    pixels[ (int)(j * w + i)] = 255 - rand() % 200;
                } else {
                    pixels[ (int)(j * w + i)] = 0;
                }
&lt;/code&gt;&lt;/pre&gt;

</description>
        <pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://sfpc.zanarmstrong.com/Synthesizing%20Images%20Part%20II/</link>
        <guid isPermaLink="true">http://sfpc.zanarmstrong.com/Synthesizing%20Images%20Part%20II/</guid>
      </item>
    
  </channel>
</rss>