<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ITPindia &#187; sketch</title>
	<atom:link href="http://itp.nyu.edu/~ia303/thunk/category/sketch/feed/" rel="self" type="application/rss+xml" />
	<link>http://itp.nyu.edu/~ia303/thunk</link>
	<description>India’s ITP blog</description>
	<lastBuildDate>Fri, 10 Apr 2009 06:20:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A2Z midterm: Vocabu-lame</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2009/03/10/a2z-midterm-vocabu-lame/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2009/03/10/a2z-midterm-vocabu-lame/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 11:30:44 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[A2Z]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mainstreaming Information]]></category>
		<category><![CDATA[midterm]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=551</guid>
		<description><![CDATA[
Apparently, I have learned absolutely nothing all semester, because what seemed like a very straightforward project proved to be completely beyond my abilities.
The overarching goal is to generate data for the visualization I&#8217;m making for Lisa Strausfeld and Christian Marc Schmidt&#8217;s Mainstreaming Information class. Click the image above to see some slides (PDF, 128 KB) [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://itpindia.files.wordpress.com/2009/03/slides.pdf'><img src="http://itpindia.wordpress.com/files/2009/03/vocabulap_7.png" alt="vocabulap, slide 7" title="vocabulap, slide 7" width="450" height="338" class="alignnone size-full wp-image-31" /></a></p>
<p>Apparently, I have learned absolutely nothing all semester, because what seemed like a very straightforward project proved to be completely beyond my abilities.</p>
<p>The overarching goal is to generate data for the visualization I&#8217;m making for Lisa Strausfeld and Christian Marc Schmidt&#8217;s <a href="http://www.christianmarcschmidt.com/NYU2009/index.html">Mainstreaming Information</a> class. Click the image above to see some slides (PDF, 128 KB) explaining the gist of the project, provisionally called Vocabulap (<em>vocabulary</em> + <em>overlap</em>; not a handsome coinage). My specific goals for the A2Z midterm were as follows (with subsequent comments in all caps):</p>
<blockquote><p>For A2Z midterm<br />
===============<br />
Prep<br />
&#8212;-<br />
* Remove all blank lines<br />
    DONE<br />
* Remove all extra spaces<br />
    DONE<br />
* Break all lines &#8211; DONE<br />
* Rename all to number consecutively: A01, A02, . . . A10 (for old books); B01, B02, . . . B10 (for new books)<br />
    DONE</p>
<p>Compare major sets<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
* Extract the text from between the body tags in each file. Dump it out as a new file with the extension body.txt in the folder ../body.<br />
    THIS IS HARDER THAN IT LOOKS (FOR ME, AT LEAST). EASIER TO JUST CUT THEM OFF BY HAND.<br />
* Concatenate all the files in each set.<br />
    DID THIS FROM THE COMMAND LINE, USING CAT<br />
* Make a list of unique words in each concatenated set, with the number of times the word appears.<br />
    CAN GET THE UNIQUE WORDS, BUT NOT THE COUNT.<br />
* Strip out all words beginning with numerals.<br />
    DONE BY HAND<br />
* Create the following lists:<br />
    &#8211; Words shared by both major sets, with frequency counts<br />
    &#8211; Words unique to set 1, with frequency counts<br />
    &#8211; words unique to set 2, with frequency counts<br />
    I APPARENTLY CANNOT DO ANY OF THIS.</p>
<p>Find unique words in each book<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
For each book:<br />
* Concatenate all the files in that major set *except* the file for that book.<br />
* Make a list of the unique words, with frequency counts, in<br />
    &#8211; the current book<br />
    &#8211; the set of all books except the current one<br />
* Make three lists:<br />
    &#8211; Words shared by all books in the major set, with frequency counts<br />
    &#8211; Words that appear only in the current book, with frequency counts<br />
    &#8211; Words that appear only outside the current book, with frequency counts</p>
<p>Return lines surrounding specific words<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
For each word in a given list:<br />
* Get the line numbers on which it appears.<br />
For each appearance,<br />
* Print the line above<br />
* Print the line with the word, replacing it with itself wrapped in span tags to apply color<br />
* Print the line below</p></blockquote>
<p>The most essential piece of code that I could not get working is the comparison doodad. It almost worked for, like, five seconds, but it was generating a huge file of every unique word times however many words were in the document, or something like that. When I tried to fix it, it completely stopped working. The offending code is as follows:</p>
<pre class="brush: java">/*  1. Takes in a file name from the command line.
    2. Makes a string array out of the hard-coded comparison file.
    3. Imports the contents of the file whose name was passed in.
    4. For each line of the input file (i.e., each word), changes it to
       lowercase and checks to see if it&#039;s contained in the comparison file.
    5. If it&#039;s not in the comparison file, checks to see if it&#039;s in a hashset of
       unique words.
    6. If the word&#039;s not in the hashset, add it.
    7. Print the contents of the hashset.
*/

import java.util.ArrayList;
import java.util.HashSet;
import com.decontextualize.a2z.TextFilter;

public class CompareUnique extends TextFilter
{
    public static void main(String[] args)
    {
        new CompareUnique().run();
    } // end main

    private String filename = &quot;body/unique/allB_uci.txt&quot;;
    private HashSet uniqueWords = new HashSet();
    private HashSet lowercaseWords = new HashSet();

    // make a String array out of the contents of the comparison file
    String[] checkAgainst = new TextFilter().collectLines(fromFile(filename));

  public void eachLine(String word)
  {
    String wordLower = word.toLowerCase();
    for (int i = 0; i &amp;lt; checkAgainst.length; i++)
    {
        if (checkAgainst[i] != null &amp;amp;&amp;amp; checkAgainst[i].contains(wordLower))
		{} // end if
		else if (checkAgainst != null)
		{
            if (lowercaseWords != null &amp;amp;&amp;amp; lowercaseWords.contains(wordLower))
            { } // end if
            else if (lowercaseWords != null)
            {
                uniqueWords.add(wordLower);
                lowercaseWords.add(wordLower);
            } // end else
 		} // end else
    } // end for
  } // end eachLine

  public void end()
  {
    for (String reallyunique: uniqueWords) {
      println(reallyunique);
    } // end for
  } // end end

} // end class</pre>
<p><em>I know, it seems very simple, but you have no idea how long it took me to get this far.</em></p>
<p>So, basically, for the midterm I&#8217;ve got bupkis—just a big pile of text files, and a list of unique words for each.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2009/03/10/a2z-midterm-vocabu-lame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Graffiti Glove: Documentation</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 15:00:15 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wearables]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=378</guid>
		<description><![CDATA[
Above is the PowerPoint slideshow that Diego made for our in-class presentation. There is also copious supporting material at the following locations:

Photos, with lots of chatty comments

Videos, interspersed with kittenage
Arduino code
Processing code

colors_highlight_new_swatch – this is the color palette module. It reads a text file containing all the colors in the appropriate Krylon spraypaint line and [...]]]></description>
			<content:encoded><![CDATA[<p><embed src="http://blip.tv/play/AeCfEI_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true" style="margin-left:30px;"></embed></p>
<p>Above is the PowerPoint slideshow that Diego made for our in-class presentation. There is also copious supporting material at the following locations:<span id="more-378"></span></p>
<ul>
<li>Photos, with lots of chatty comments<br />
<object width="400" height="300"><param name="flashvars" value="&#038;offsite=true&amp;lang=en-us&#038;page_show_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2F&#038;set_id=72157609600581342&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=63961"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=63961" allowFullScreen="true" flashvars="&#038;offsite=true&amp;lang=en-us&#038;page_show_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2F&#038;set_id=72157609600581342&#038;jump_to=" width="400" height="300"></embed></object></li>
<li><a href="http://itpindia.blip.tv/">Videos</a>, interspersed with kittenage</li>
<li><a href="http://itp.nyu.edu/~ia303/PhysComp/final/graffiti_glove_4_sensors.zip">Arduino code</a></li>
<li>Processing code
<ul>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/colors_highlight_new_swatch/applet/index.html">colors_highlight_new_swatch</a> – this is the color palette module. It reads a text file containing all the colors in the appropriate Krylon spraypaint line and outputs them as a grid of colored squares. The active swatch and rolled-over ones are highlighted with colored borders. It&#8217;s glitchy, as you can see if you look in the upper left corner, but basically it works.</li>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/spraycans/applet/index.html">spraycans</a> – I would like to make my own set of brushes, based on Diego&#8217;s, that are all the same style but in different sizes. These would then be mapped to the number of fingers being held up, with more fingers triggering a bigger spray cone. This would make it easier for users to get predictable, slightly repeatable results. Toward that end, I made a spraycan object whose spray cone, label number (for the size), and can color (for the paint) are variable. Epileptics should probably not view this sketch.</li>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/final_application_4/applet/index.html">Main application</a> – The &#8220;final&#8221; in &#8220;final_application_4&#8243; refers to the this being our final project for the semester, not to the code itself actually being final. For, verily, it is not. This is the wrapper into which all the other modules will eventually be rolled. It&#8217;s a whole lot of nested if statements and functions. This program doesn&#8217;t run unless the glove is plugged in; I should fix that, to make it easier to check code while programming.</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baby steps</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 04:22:45 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[CommLab]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=338</guid>
		<description><![CDATA[
This is the second smidgen of the code for our final project. It pulls RGB values and color names from a tab-delimited text file (which is, itself, based on the actual Krylon color options) and outputs this grid of swatches. The swatches don&#8217;t do anything yet&#8212;just drawing them took me, like, two days, thank you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/applet/index.html"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/krylon_palette.png" alt="grid of 61 colored squares" title="Krylon color palette" width="400" height="355" class="alignnone size-full wp-image-340" /></a></p>
<p>This is the second smidgen of the code for our final project. <a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/applet/index.html">It</a> pulls RGB values and color names from <a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/data/Krylon_colors.txt">a tab-delimited text file</a> (which is, itself, based on the <a href="http://www.krylon.com/products/indooroutdoor_paint/">actual Krylon color options</a>) and outputs this grid of swatches. The swatches don&#8217;t <em>do</em> anything yet&#8212;just drawing them took me, like, two days, thank you very much, and that was <em>with</em> some very helpful help from Shawn. Partly this is because I apparently can&#8217;t keep in my head for more than thirty seconds how arrays and objects work, and partly it&#8217;s because I just. can&#8217;t. focus. And partly it&#8217;s because I apparently have no idea what the fuck I&#8217;m doing.</p>
<p>I&#8217;m beginning to really like Diego&#8217;s Plan B, as proposed over the weekend: </p>
<blockquote><p>
	Fake our own deaths.
</p></blockquote>
<p><span id="more-338"></span><br />
I keep telling myself I have to not panic and just write the code one piece at a time. Then, later, I can get somebody to help me put it all together, which is something I <em>know</em> I have no clue how to do. But just accomplishing what seem like they should be simple things is stumping me. Most recently, I was trying to get the swatch name to be displayed when a square is rolled over. This is not by any means an important feature&#8212;in fact, it doesn&#8217;t really serve any purpose. But I <em>should</em> be able to do it, and I can&#8217;t figure out why it doesn&#8217;t work. I keep getting errors like &#8220;The function showName() does not exist&#8221; or &#8220;Cannot find anything named &#8217;swatches.&#8217;&#8221; Both of these things do, of course, exist, and I can&#8217;t see any reason why they wouldn&#8217;t be found.</p>
<p>I know it&#8217;s pretty rare for computers to just <em>fuck up</em> and much more common for <em>me</em> to do so, so I&#8217;m sure the answer is that I&#8217;ve done something really dumb and sloppy somewhere. But it could easily take me two hours to find that error, and every new goddamn line of code seems to cause some new mysterious issue. I can feel myself growing older just thinking about it. And there are a lot more lines of code to go. Here&#8217;s the stuff I was hoping to get done, oh, by, say, last Thursday: </p>
<div style="background-color:#333; padding:10px;">
<h3>Graffiti Glove Components</h3>
<h4>Brush selector</h4>
<ul>
<li>
			Read flex sensor data </p>
<ul>
<li style="list-style-type: circle;">
					1 finger = marker
				</li>
<li style="list-style-type: circle;">
					2 fingers = small spray
				</li>
<li style="list-style-type: circle;">
					3 fingers = medium spray
				</li>
<li style="list-style-type: circle;">
					4 fingers = large spray
				</li>
</ul>
</li>
</ul>
<h4>Color selector</h4>
<ul>
<li>
			Display grid of color swatches
		</li>
<li>
			Display color name on rollover
		</li>
<li>
			Highlight selected swatch on click
		</li>
<li>
			Change drawing color on click
		</li>
</ul>
<h4>Erase</h4>
<ul>
<li>
			Ask for confirmation
		</li>
</ul>
<h4>Undo</h4>
<ul>
<li>
			Undo last stroke
		</li>
<li>
			Redo stroke that was just undone
		</li>
</ul>
<h4>Save drawing</h4>
<ul>
<li>
			Ask for file name
		</li>
<li>
			Append time stamp
		</li>
<li>
			Display confirmation
		</li>
</ul>
<h4>Change background</h4>
<ul>
<li>
			Display four background thumbnails </p>
<ul>
<li style="list-style-type: circle;">
					subway car
				</li>
<li style="list-style-type: circle;">
					brick wall
				</li>
<li style="list-style-type: circle;">
					white van
				</li>
<li style="list-style-type: circle;">
					blank
				</li>
</ul>
</li>
</ul>
<h4>Paint in spray pattern</h4>
<ul>
<li>
<p>			Draw an ellipse
		</li>
<li>
			Make random pixels within the ellipse transparent
		</li>
</ul>
<h4>Switch modes</h4>
<ul>
<li>
			Save drawing
		</li>
<li>
			Display palette
		</li>
<li>
			Hide palette
		</li>
<li>
			Restore drawing
		</li>
</ul>
</div>
<p>And that&#8217;s not including the task of sewing us a new glove, for which I bought fabric on Monday, as well as a book about how to use my virgin four-year-old Juki serger. I know that&#8217;ll be fun once I get started, but I just can&#8217;t get started.</p>
<p>Maybe I need a drink.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sketching sketch</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/11/21/sketching-sketch/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/11/21/sketching-sketch/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 13:41:08 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=288</guid>
		<description><![CDATA[
I decided to start my final ICM project with the drawing interface, because it&#8217;s a discrete program in itself, and because I could actually sort of picture what it might look like. So I made a list of components—stroke palette, color picker, eraser, eyedropper, transparency picker, etc.—and decided to build them one at a time. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/ICM/final/draw_mouse_line_w_stroke_palette/applet/index.html"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/hand_sketch.gif" alt="" title="hand sketch" width="450" height="400" class="alignnone size-full wp-image-289" /></a></p>
<p>I decided to start my final ICM project with the drawing interface, because it&#8217;s a discrete program in itself, and because I could actually sort of picture what it might look like. <span id="more-288"></span>So I made a list of components—stroke palette, color picker, eraser, eyedropper, transparency picker, etc.—and decided to build them one at a time. At the same time, I joined forces on the Physcomp final with Diego, for his glove project that turned out to be a drawing tool, so I knew the interface might need to change, in order to work with that hardware.</p>
<p>It seemed like it had been weeks since I&#8217;d written sketch in Processing, so I started by rereading the chapters on objects and arrays from the book. Then I made the supersimple mouse-tracking line-drawer that we did at the beginning of the semester. And then I added a stroke-width selection palette to work with that. The first version is above. How it works:</p>
<p>The line turns on and off with a mouse click, so when the sketch opens, if you wave your mouse around, you get no line. Then you click once to turn the drawing tool&#8212;let&#8217;s call it a pencil&#8212;on, and you draw, draw, draw. You can click to turn off the pencil at any time, select a different stroke width, and click to start drawing again, from a new mouse position. The stroke that&#8217;s currently selected in the palette appears highlighted in green, with the line in black; all the inactive stroke sizes are gray.</p>
<p>What&#8217;s wrong with this interface:</p>
<ol>
<li>At program launch, it&#8217;s supposed to default to the thinnest line, in black. I forgot to set that up, so instead, if you turn on the pencil without selecting a stroke width first, you get the last line style that was drawn to make the palette, which is the 16-point version in gray. Oops.</li>
<li>There&#8217;s no indicator showing whether the pencil is on or off. So a couple of times when I thought it was off, I moved my mouse and found that it was on.</li>
<li>There&#8217;s no undo. If I could undo the previous stroke, problem 2 would be surmountable.</li>
<li>There&#8217;s no eraser. This would also help with problem 2.</li>
<li>The thicker lines are not smooth. I guess this is because I&#8217;ve got the stroke ends set to square, because it made the palette look neater; either round ends need to be turned back on for drawing, or I need to interpolate the pixels between the line segments.</li>
<li>The focus highlighting on the fattest stroke in the palette isn&#8217;t wide enough.</li>
<li>You shouldn&#8217;t be able to draw behind or over the palette.</li>
</ol>
<p>Questions:</p>
<ul>
<li>Clicking to turn the pencil on and off is a bit confusing, perhaps. Maybe it should be click-and-drag, instead?</li>
<li>This stroke selector is probably too difficult to operate when you&#8217;re using a glove-mounted LED that&#8217;s being tracked by a camera, instead of drawing directly with a mouse. Maybe it should be a single slider, instead, for the PComp version. You basically need to be able to use this interface with mittens on.</li>
</ul>
<p>So, obviously, I need to solve the various problems, of which #3 is probably the tricksiest. To make an undo command, I think I&#8217;ll probably save the drawing state every time the pencil is turned off. And &#8220;undo&#8221; should use the standard keyboard shortcut, of course, as well as having a button.</p>
<p>Once those issues are addressed, I think color is the next thing to deal with. The color picker may be so large as to have to be retractable, in which case saving the drawing state becomes even more essential.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/11/21/sketching-sketch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Painterly pixels</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/11/18/painterly-pixels/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/11/18/painterly-pixels/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 16:46:38 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[ICM]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=277</guid>
		<description><![CDATA[
If you have trouble imagining how one might make expressive images using tools like Processing, take a look at the beautiful pixel-style art of Craig @ Superbrothers.

Of course, some of the loveliness of these illustrations comes from the fact that they&#8217;re not made of flat, pure-hued pixels—the colored rectangles are grainy, organic, and warm. But [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://illoz.com/superbrothers/?section=portfolios"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/superbrothers.gif" alt="" title="superbrothers" width="330" height="397" class="alignnone size-full wp-image-278" /></a></p>
<p>If you have trouble imagining how one might make expressive images using tools like Processing, take a look at the beautiful pixel-style art of <a href="http://www.superbrothers.ca/">Craig @ Superbrothers</a>.<br />
<span id="more-277"></span><br />
Of course, some of the loveliness of these illustrations comes from the fact that they&#8217;re <em>not</em> made of flat, pure-hued pixels—the colored rectangles are grainy, organic, and warm. But the greater part of their success comes, I think, from the concision of the shapes. So much information is conveyed by so few squares.</p>
<p>If you can channel that kind of economy, you can probably draw with anything.</p>
<p>Via <a href="http://illoz.com/superbrothers/?section=portfolios">illoz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/11/18/painterly-pixels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hear No Evil</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/11/09/hear-no-evil/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/11/09/hear-no-evil/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 20:53:44 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[CommLab]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=213</guid>
		<description><![CDATA[
I&#8217;m working with Dimitri(o)s, Diego, and Jason on the video project du jour, and this week we had to draw storyboards for our piece. The guys wrote a script on Thursday, while I had a prior engagement. Today we split the script up into four chunks, and each of us drew the panels for one [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/indiamos/3014184594/" title="&quot;Hear No Evil&quot; storyboard, p. 1 by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3003/3014184594_e3ffe299ca.jpg" width="500" height="386" alt="&quot;Hear No Evil&quot; storyboard, p. 1" /></a></p>
<p>I&#8217;m working with <a href="http://itp.nyu.edu/blogs/dm1837/">Dimitri(o)s</a>, <a href="http://itp.nyu.edu/~dr1247/diagonalpeople/">Diego</a>, and <a href="http://itp.nyu.edu/~jr516/BLOG/BLOG/">Jason</a> on the video project du jour, and this week we had to draw storyboards for our piece. The guys wrote a script on Thursday, while I had a prior engagement. Today we split the script up into four chunks, and each of us drew the panels for one section. My first four panels are above. The whole storyboard is in <a href="http://itp.nyu.edu/~dr1247/CLAB/HNE_storyboard.pdf">this PDF</a> that Diego made. As a bonus, doing this assignment also got me off the hook for missing a few days of <a href="http://drawmo.wordpress.com/">DrawMo!</a></p>
<p>The gist of the story is that this guy (ML, aka Male Lead) discovers that his headphones allow him to hear other people&#8217;s thoughts—but only negative ones.</p>
<p>Next week, we&#8217;re somehow going to try to shoot this thing, in the subway. Fortunately, it looks like <a href="http://www.nyc.gov/html/film/downloads/pdf/moftb_permit_rules_final.pdf">videotaping in the subway, even with a tripod, is <em>not</em> illegal</a>, as long as you don&#8217;t block access or passage. Basically, as long as we don&#8217;t act like those film crew assholes who&#8217;re always redirecting me around my own fucking office building, we should be fine. Cops often have interesting misconceptions about the laws they&#8217;re supposedly enforcing, though, so I&#8217;ll try to remember to print out a copy of the rules before we go.</p>
<p>P.S. We used a cleaner version of the <a href="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/storyboard.pdf">storyboard form</a>, which I made because <a href="http://itp.nyu.edu/~mp51/commlab/storyboard.html">the one Spencer supplied</a> filled me with sorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/11/09/hear-no-evil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MC Squared</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 07:35:11 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[midterm]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=154</guid>
		<description><![CDATA[
Get it now! Detailed, full-color documentation of the famed MC Squared midterm project!
MC_Squared(fin).pdf (14.68 MB; sorry, it contains a couple of embedded videos)
We gave our presentation today, the thing mostly worked, and it wasn&#8217;t too embarrassing. And, unlike some people in the class, my group actually got two or three hours of precious, golden sleep [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/PhysComp/midterm/MC_Squared(fin).pdf"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/thumbnails.gif" alt="MC Squared documentation thumbnails" title="MC Squared documentation thumbnails" width="356" height="409" class="alignnone size-full wp-image-157" /></a></p>
<p>Get it now! Detailed, full-color documentation of the famed MC Squared midterm project!</p>
<p><a href="http://itp.nyu.edu/~ia303/PhysComp/midterm/MC_Squared(fin).pdf">MC_Squared(fin).pdf</a> (14.68 MB; sorry, it contains a couple of embedded videos)</p>
<p>We gave our presentation today, the thing mostly worked, and it wasn&#8217;t too embarrassing. And, unlike some people in the class, my group actually got two or three hours of precious, golden <em>sleep</em> the night&#8212;well, morning&#8212;before. (We closed down the floor at about 3:30 a.m., but a few of our classmates relocated to the library or some such place to keep working. Everybody seemed pretty crispy by 9:30 this morning.)</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp, week 6: Bride of Serial Out</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 07:07:42 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=140</guid>
		<description><![CDATA[This week&#8217;s lab was mostly uneventful, although it took me something like six hours to do&#8212;I started after our CommLab make-up class ended, around 4 pm, and stayed until nine or ten.
First I thought I&#8217;d use one of these nifty sensors I got from SparkFun, 

but then I realized I have no idea how you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/physcomp/Labs/SerialDuplex">This week&#8217;s lab</a> was mostly uneventful, although it took me something like six hours to do&#8212;I started after our CommLab make-up class ended, around 4 pm, and stayed until nine or ten.</p>
<p>First I thought I&#8217;d use one of these nifty sensors I got from SparkFun, </p>
<p><a href="http://www.flickr.com/photos/indiamos/2943803298/" title="PComp lab, week 5: Serial Out by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3031/2943803298_1f73c40d47_m.jpg" width="240" height="180" alt="PComp lab, week 5: Serial Out" /></a></p>
<p>but then I realized I have no idea how you&#8217;re supposed to hook them up. Stick the pins straight into the breadboard? Solder wires on? How long should the wires be? So instead I used the stupid knob again, plus one of the IRs I bought for our midterm project.</p>
<p>The thrill of the knob has totally worn off. Then I saw Jorge soldering wires to an ultrasonic range finder just like the one I have, and I thought maybe it was a good time to try out my own. Ha! Thus began one of my more frustrating soldering bouts so far.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2943803750/" title="Helping hands by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3221/2943803750_eb43911272_m.jpg" width="240" height="180" alt="Helping hands" /></a></p>
<p>It must have taken me forty-five minutes to solder three freaking wires onto this cookie . . . and then it took me another hour to realize that the reason it wasn&#8217;t working was that I&#8217;d soldered the yellow wire to the wrong hole. And then I couldn&#8217;t get it <em>un</em>soldered to save my life, so I just attached a fourth wire.</p>
<p>Finally I got them all hooked up:</p>
<p><a href="http://www.flickr.com/photos/indiamos/2942944227/" title="1 digital + 2 analog by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3206/2942944227_264e83109e_m.jpg" width="180" height="240" alt="1 digital + 2 analog" /></a></p>
<p>And then, there was serial output:</p>
<ul>
<li><a href="http://www.flickr.com/photos/indiamos/2946608608/in/set-72157607212375323/">&#8220;Now you get a range of garbage characters.&#8221;</a></li>
<li><a href="http://www.flickr.com/photos/indiamos/2946608692/in/set-72157607212375323/">&#8220;List all the available serial ports.&#8221;</a></li>
<li><code> <a href="http://www.flickr.com/photos/indiamos/2946609060/in/set-72157607212375323/">// print out the values you got:</a><br />
    for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) {<br />
      print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t");<br />
    }<br />
    // add a linefeed after all the sensor values are printed:<br />
    println();</code></li>
</ul>
<p>Et cetera.</p>
<p>After all that hair-pulling, the ultrasonic sensor was giving me really erratic readings (then again, so was the push-button switch: its value didn't change when I <em>pushed</em> the button, but it did when I <em>touched</em> the button). So I switched to two IR sensors, since I had so many lying around.</p>
<p>Then I got to the part about the handshake. Handshaking? Was not happening for me. I think it may have had something to do with this:</p>
<p><a href="http://www.flickr.com/photos/indiamos/2945745779/" title="PhysComp homework, week 6: serial out 2: 15 by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3203/2945745779_02eb104340_m.jpg" width="226" height="240" alt="PhysComp homework, week 6: serial out 2: 15" /></a> <a href="http://www.flickr.com/photos/indiamos/2945745813/" title="PhysComp homework, week 6: serial out 2: 16 by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3049/2945745813_3abc083f17_m.jpg" width="226" height="240" alt="PhysComp homework, week 6: serial out 2: 16" /></a></p>
<p>The Processing application was looking for the word "hello," but the Arduino didn't seem to be able to say the word without stuttering horribly. I tried for more than an hour, I think, to get them to talk to each other, but finally I had to just give up.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp midterm project, week 2: Rough prototype</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 15:35:02 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[midterm]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=123</guid>
		<description><![CDATA[
Part 2 in the saga that began last week.
After spending about an hour playing with the Minim library in Processing, I went into the lab to see if I could get it to work with actual input from our IR sensors. This was basically a repeat of this week&#8217;s homework, which I&#8217;d done, for once, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/indiamos/2943757274/" title="A semi-working prototype! by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3234/2943757274_c221cdf116.jpg" width="450" height="282" alt="A semi-working prototype!" /></a></p>
<p>Part 2 in <a href="http://itp.nyu.edu/~ia303/thunk/2008/10/09/midterm-project-week-1-observation/">the saga that began last week</a>.</p>
<p>After spending about an hour playing with the <a href="http://code.compartmental.net/tools/minim/">Minim</a> library in Processing, I went into the lab to see if I could get it to work with actual input from our IR sensors. This was basically a repeat of this week&#8217;s homework, which I&#8217;d done, for once, <em>before</em> the morning it was due, so the wiring part was uncharacteristically easy. I need to get some header pins, though; the stranded wire on the IR sensors is a pain to plug into a breadboard.</p>
<p>So our project&#8212;which I realize I didn&#8217;t explain last week&#8212;is going to be a cubeoid musical (or, at least, noisy) instrument with an infrared sensor set into each side, mounted corner-up (<a href="http://www.flickr.com/photos/indiamos/2926903690/">as demonstrated by Diego</a>) on a camera tripod. One or more players can then use their hands or other body parts or utensils or pets to trigger different sounds from each side. We were thinking that for Phase One, i.e., this week, we&#8217;d have the sounds be synthesized tones, and that for Phase Two, the final version, we&#8217;d make it play various different loops.</p>
<p>It turned out, however, that it&#8217;s far easier&#8212;for me, at least&#8212;to get Minim to play loops than to synthesize sounds. And there are a lot of free sound clips out there in the world. I got mine from <a href="http://www.canadianmusicartists.com/samples.html">CanadianMusicArtists.com</a>. This pre-prototype, therefore, has only two sensors, both of which trigger audio loops. It also has the beginnings of a lame-ass bouncing ball animation, but it doesn&#8217;t do what I want it to do, mostly because the signal&#8217;s changing too rapidly. Graphics were a tentative feature for Phase Two, so I&#8217;m not going to fuss with that part any more this week.</p>
<p>Here&#8217;s some crappy video of Filippo (left) and Diego (right) making the sensors generate noise. You can barely hear it, unfortunately&#8212;listen for the annoying rapid clicking sound, which I think is the hi-hat sound. </p>
<p><embed src="http://blip.tv/play/AdOvdI_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
<p>The beauty part? This doubles as my <a href="http://itp.nyu.edu/~sve204/icm_fall08/">ICM</a> homework.</p>
<p>Here&#8217;s the Arduino code:</p>
<blockquote><p><code>/*  Reads data from two analog sensors (IR sensors, in this specific example)<br />
    and outputs the values in a format that can be easily parsed in Processing.<br />
*/</p>
<p>int ledPin = 7;<br />
int irSensor0 = 0;<br />
int irSensor1 = 1;<br />
int sensorValue = 0;</p>
<p>void setup()<br />
{<br />
    //  Flash the LED three times to announce the start of program.<br />
    pinMode( 7, OUTPUT );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );</p>
<p>    // Start serial port at 9600 bps:<br />
    Serial.begin( 9600 );<br />
}</p>
<p>void loop()<br />
{<br />
    if (Serial.available() > 0)<br />
    {<br />
    //  Read the first (0) sensor:<br />
    sensorValue = analogRead( irSensor1 );</p>
<p>    // print the results:<br />
    Serial.print( sensorValue, DEC );<br />
    Serial.print( "\t" );</p>
<p>    // read the second (1) sensor:<br />
    sensorValue = analogRead( irSensor0 );<br />
    // print the results:<br />
    Serial.println( sensorValue, DEC );</p>
<p>    //  Follow the last sensor value with a println() so that<br />
    //  each set of four readings prints on a line by itself:<br />
    Serial.println( sensorValue, DEC );<br />
    //  delay ( 100 );<br />
    }<br />
}</code></p></blockquote>
<p>And here&#8217;s the  <a href="http://itp.nyu.edu/~ia303/ICM/week6/music_box_2xIR/applet/music_box_2xIR.pde">Processing code</a>, where most of the excitement takes place.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp, week 5: Serial Out</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 12:54:11 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=108</guid>
		<description><![CDATA[
I was trying to figure out the math to make part of the graph show up as brown&#8212;i.e., earth&#8212;and then scatter flowers on top, but something wasn&#8217;t working out and I was running late, so I gave up.
Anyway, here are the progress shots:
Setup:

Pot hooked up:

Blinking LED:

I also shot a fascinating movie of the program loading [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/picture-7.png"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/picture-7.png" alt="" title="Serial out graph" width="480" height="357" class="alignnone size-full wp-image-109" /></a></p>
<p>I was <em>trying</em> to figure out the math to make part of the graph show up as brown&#8212;i.e., earth&#8212;and then scatter flowers on top, but something wasn&#8217;t working out and I was running late, so I gave up.</p>
<p>Anyway, here are the progress shots:</p>
<p>Setup:<br />
<a href="http://www.flickr.com/photos/indiamos/2926906248/" title="P1000190.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3098/2926906248_38d7beec10_m.jpg" width="240" height="180" alt="P1000190.JPG" /></a></p>
<p>Pot hooked up:<br />
<a href="http://www.flickr.com/photos/indiamos/2926907936/" title="P1000199.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3239/2926907936_52047b2cea_m.jpg" width="240" height="180" alt="P1000199.JPG" /></a></p>
<p>Blinking LED:<br />
<a href="http://www.flickr.com/photos/indiamos/2926055893/" title="P1000204.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3269/2926055893_09a3388587_m.jpg" width="240" height="180" alt="P1000204.JPG" /></a></p>
<p>I also shot a <em>fascinating</em> movie of the program loading on the Arduino and starting up&#8212;you know, flickering yellow light, then blinking LED; hot stuff:</p>
<p><embed src="http://blip.tv/play/AdKrL4_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
<p>Final code on Arduino:</p>
<blockquote><p><code>int potPin = 0;<br />
int potValue = 0;<br />
int ledPin = 2;</p>
<p>void setup()<br />
{<br />
  // flash LED three times to announce start of program<br />
  pinMode( 2, OUTPUT );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );</p>
<p>  // start serial port at 9600 bps:<br />
  Serial.begin( 9600 );<br />
}</p>
<p>void loop()<br />
{<br />
  // read analog input, divide by 4 to fit it in the range 0-255:<br />
  potValue = analogRead( potPin );<br />
  potValue = potValue / 4;<br />
  Serial.print( potValue, BYTE );<br />
  // pause for 10 milliseconds:<br />
  delay( 10 );<br />
}<br />
</code></p></blockquote>
<p><a href="http://itp.nyu.edu/~ia303/PhysComp/week5/graph_serial_from_pot/applet/">Final Processing applet</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
