<?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>in.somniac</title>
	<atom:link href="http://in.somniac.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://in.somniac.me</link>
	<description>paul shen</description>
	<lastBuildDate>Thu, 05 Jan 2012 15:28:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Happy birthday!</title>
		<link>http://in.somniac.me/2012/01/happy-birthday/</link>
		<comments>http://in.somniac.me/2012/01/happy-birthday/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 15:06:20 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=644</guid>
		<description><![CDATA[<p>I love seeing the Facebook notification light up on my birthday. Who doesn't? But my guess is that most people can't help but feel some sort of repetition and monotony when clicking through. Don't get me wrong; I enjoy every single post on my Facebook timeline. It makes me feel loved, you guys.</p>

<p>With the Facebook Graph API and a couple lines of JavaScript, I extracted the text from the Facebook wall posts on my last birthday. Without any names or formatting, feels a little different, doesn't it?</p>]]></description>
			<content:encoded><![CDATA[<div class="prepend-1 contain-2">
<p>I love seeing the Facebook notification light up on my birthday. Who doesn&#8217;t? But my guess is that most people can&#8217;t help but feel some sort of repetition and monotony when clicking through. Don&#8217;t get me wrong; I enjoy every single post on my Facebook timeline. It makes me feel loved, you guys.</p>

<p>With the Facebook Graph API and a couple lines of JavaScript, I extracted the text from the Facebook wall posts on my last birthday. Without any names or formatting, feels a little different, doesn&#8217;t it?</p>

<h5>/^happy b(irth)?day,?( paul( shen)?)?!*$/gim</h5>
<p>47/96 matches! I could easily list out the strings this regex matches and it would cover 50% of the wall posts.</p>

<p>I could go on and sarcastically categorize the remaining 50% but you get the point. Again, I&#8217;m grateful for all the birthday wishes; I just thought it&#8217;d be something interesting to examine. Maybe run something similar on your next birthday! Personally, I&#8217;m not much of a Facebook birthday wisher unless I have something that doesn&#8217;t match the regex above. But then I also don&#8217;t like fun (jk!) If everyone was like me, it&#8217;d be a gloomy place indeed.</p>
</div>

<div class="codecolorer-container text default grid-vertical-align" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Happy Birthday Paul!<br />
happy birthday paul!<br />
Happy Birthday, Paul!<br />
happy birthday man!<br />
happy birthday!<br />
Happy birthday!<br />
Happy Birthday Paul!<br />
Happy birthday Paul!!<br />
happy bday paul!!<br />
happy birthday<br />
happy birthday!<br />
happy bday paul!<br />
Happy Birthday!<br />
happy birday peesh<br />
Happy Birthday Paul Shen.<br />
Get back to work old person!<br />
celebrate WE WILL. Happy birthday paul shen!<br />
Happy birthday! Hope all is well :)<br />
Happy Birthday!<br />
Happy Birthday Paul!<br />
Happy birthday Paul! Don't worry, I haven't forgotten your request for a hello kitty balloon...<br />
Happy Birthday Paul!!!!!!!!!!!!!!!!!<br />
happy birthday paul!<br />
happy bday man<br />
Fijne verjaardag!<br />
whatup Paul! Alles Gute zum Geburtstag :)<br />
Happy birthday! Probably the next day for you already though. :P<br />
HBD Paul!<br />
happy birthday paulie walnuts, now please stop changing fb<br />
Happy Birthday Paul :)<br />
Happy birthday!! I'm in so cal now and the weather is so nice that Ｉdon't wanna go back to pitt anymore :(<br />
happy birthday!!!<br />
Happy birthday Paul Shen! Hope you are enjoying family in Taiwan :)<br />
happy birthday paul!<br />
Happy birthday! :)<br />
Happy birthday!<br />
happy birthday paul!<br />
Hey there -- have a great birthday and a great year!<br />
Happy birthday Paul! You're going the distance!<br />
Happy birthday!<br />
Awwwww shieeee who's gett'n older...happy bday man.<br />
happy birthday!<br />
Happy birthday Paul!<br />
Happy Birthday Brooo !<br />
Happay birfdai!<br />
happy birthday!! :)<br />
Happy birthday!<br />
Happy birthday!!<br />
PAUL SHEN HAPPY BIRTHDAY!!! too bad we couldn't celebrate in taipei, but have fun in tainan!<br />
HBD!<br />
Happy Birthday to my favorite Paul Shen!! Tru Cru love forevs!<br />
happy birthday paul!<br />
Happy birthday Pa-ul!<br />
Happy birthday!<br />
happy birthday paul!<br />
happy birthday!<br />
happy birthday paul!<br />
Happy birthday Paul!<br />
happy birthday!!!<br />
happy birthday paul!<br />
happy bday man!<br />
happy birthday!<br />
&lt;3<br />
Happy Birthday Paul!!<br />
happy birthday Paul!<br />
happy birthday paul!!<br />
happy birthday!<br />
Happy Birthday<br />
Happyy birthday!! Are you still in tw??<br />
Happy birthday! Hope you have a great one and happy new year!<br />
Happy birthday<br />
Happy Birthday, Paul!<br />
Happy Birthday！<br />
生日快樂！我們在「event」給你做生日吧！<br />
happy birthday!<br />
hahahapppy birthday!!!!<br />
paul! happy birthday! you 21 yet?<br />
Have a spiffy one Paul Shen.<br />
Happy Birthday Paul! Hope you have a good one. :)<br />
Paul 生日快樂！ hope you're having fun in Taiwan man! and happy belated new year!<br />
Happy birthday!<br />
happy birthday man<br />
Happy birthday! You should go to Party World in Taiwan for your birthday!<br />
Paul it's time for you to come back and hang out with us. Happi birthday!<br />
paul shen! happy birthday! how was Taiwan?<br />
happy birthday paul! hope you're having a blast in taiwan :)<br />
hey paul! happy birthday man! :-)<br />
Happy birthday!<br />
happy birthday dude<br />
happy birthday, paul!<br />
haha, happy birthday, birthday twin! hope taiwan has been treating you well =)<br />
happy birthday! neighbor!<br />
still in tw? joyeux anniversaire ;) (was gonna write joyeux anniversaire prochaine but its wrong...)<br />
happy birthday!!!<br />
woah woah woah woah woah it's your birthday! (your time!)<br />
happy birthday! come back and visittt</div></div>

]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2012/01/happy-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh hai 2012</title>
		<link>http://in.somniac.me/2012/01/oh-hai-2012/</link>
		<comments>http://in.somniac.me/2012/01/oh-hai-2012/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 06:51:13 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=641</guid>
		<description><![CDATA[<p>I will be less lazy.</p>

<p>I'm serious this year. I might've said the same thing last year, and the year before, and now to think about it, the year before that too.</p>]]></description>
			<content:encoded><![CDATA[<p>tl;dr: I will be less lazy.</p>

<h5>The usual</h5>
<p>I&#8217;m serious this year. I might&#8217;ve said the same thing last year, and the year before, and now to think about it, the year before that too.</p>

<ul>
<li>Sleep earlier</li>
<li>Exercise &mdash; couch to 5k style</li>
<li>Spend less time on YouTube</li>
<li>Take more photos</li>
<li>etc.</li>
</ul>

<p>Okay okay, here are some more concrete goals.</p>

<h5>Write more</h5>
<p>Since I&#8217;m already here, the last post on this site (let&#8217;s not call it a blog) was over a year ago. I used to redesign my blog every time I visited it but this one still doesn&#8217;t look too bad (though I should renew that Typekit subscription). Let&#8217;s aim for twelve thoughtful posts by year end.</p>

<h5>Record a &#8220;CD&#8221;</h5>
<p>No, I don&#8217;t plan to become the next Justin Bieber but I&#8217;ve got a pair of mics, a six-note range, and a guitar. Should be able to hammer out ten covers by the end of year. We&#8217;ll call it <em>Me and My Guitar</em>. or <em>He and Her</em>. TBD.</p>

<h5>Make stuff</h5>
<p>I&#8217;ve lost touch with my self-proclaimed creative art and design side. Keeping this one vague but 2011 was a year devoid of any side hack projects.</p>

<p>I could go on but this will suffice for now. Not the most thoughtful post but it&#8217;s a start to break out of my lazy rut.</p>

<p><em>rut</em>&hellip; that&#8217;s kind of a cool word.</p>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2012/01/oh-hai-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ordering Disorder</title>
		<link>http://in.somniac.me/2010/12/ordering-disorder/</link>
		<comments>http://in.somniac.me/2010/12/ordering-disorder/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 09:06:57 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=633</guid>
		<description><![CDATA[<p>I came home to an Amazon envelope on my apartment doorstep. Inside was <a href="http://subtraction.com">Khoi Vinh</a>'s new book, <a href="http://amzn.to/gG5Icj"><em>Ordering Disorder</em></a>.</p>

<p>Grids are not anything new; the book gives a two-page history which mentions that the history of grid-based frameworks trace as far back as 9000 BCE. The typographic grid is a trademark of the International Typographic Style. Bringhurst has a chapter on "Shaping the Page"; Josef Müller-Brockmann has a great book on grid goodness in graphic design. Nowadays, look around the web and you'll find countless collections of "grid web-based design inspiration" and articles of varying levels of quality.</p>]]></description>
			<content:encoded><![CDATA[<p>I came home to an Amazon envelope on my apartment doorstep. Inside was <a href="http://subtraction.com">Khoi Vinh</a>&#8216;s new book, <a href="http://amzn.to/gG5Icj"><em>Ordering Disorder</em></a>.</p>

<a href="http://amzn.to/gG5Icj"><img src="http://in.somniac.me/wp-content/uploads/2010/12/88779649-385x467.jpg" alt="" title="88779649" width="385" height="467" class="alignright size-medium wp-image-634" /></a>

<p class="span-2">Grids are not anything new; the book gives a two-page history which mentions that the history of grid-based frameworks trace as far back as 9000 BCE. The typographic grid is a trademark of the International Typographic Style. Bringhurst has a chapter on &#8220;Shaping the Page&#8221;; Josef Müller-Brockmann has a great book on grid goodness in graphic design. Nowadays, look around the web and you&#8217;ll find countless collections of &#8220;grid web-based design inspiration&#8221; and articles of varying levels of quality.</p>

<span id="more-633"></span>

<p class="span-2">Vinh states in the beginning, &#8220;[w]hat&#8217;s not yet fully addressed is <em>how the use of the typographic grid applies to the mechanics of digital design for the World Wide Web</em>.&#8221; The book is surprisingly focused on this topic, investigating grid design in the context of the web. And even with the plethora of grid design resources, the book feels fresh. There isn&#8217;t any discussion of code implementation (phew) and a lot of what is well-covered in other books is left alone.</p>

<p>After a little history and background, the book takes a very hands-on route by walking through the design of a website; the calculations and rationale are explained in detail. The more I play with grids, the more comfortable I find myself reasoning and executing. Practice makes you better but having a little insight into the process of someone so experienced is affirming and educational. It comforted me that the overall tone is very calculated; a lot of numbers are thrown around and everything is logically reasoned. Yet, a well-executed grid design appears simple and inherently correct.</p>

<p>What started as a freeform ramble seems to have turned into happy acclaim. But, the book is definitely worthy of approval in my opinion. There is a lot beyond what is in the book but as a foundation for grid principles on the web, <em>Ordering Disorder</em> gets a spot on my bookshelf.</p>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/12/ordering-disorder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Taking vim to the next level</title>
		<link>http://in.somniac.me/2010/11/taking-vim-to-the-next-level/</link>
		<comments>http://in.somniac.me/2010/11/taking-vim-to-the-next-level/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 07:11:32 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=628</guid>
		<description><![CDATA[I love vim. It&#8217;s not for everyone, but vim is heaven for people who do a lot of text manipulation. I love introducing people to vim and spitting out shortcuts that save a keystroke here and there. For a while, the cognitive cycles needed definitely outweigh the keystroke saved but over time, you&#8217;ll find your [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://www.vim.org/">vim</a>. It&#8217;s not for everyone, but vim is heaven for people who do a lot of text manipulation. I love introducing people to vim and spitting out shortcuts that save a keystroke here and there. For a while, the cognitive cycles needed definitely outweigh the keystroke saved but over time, you&#8217;ll find your fingers moving without thinking.</p>

<p>The following are some vim tips I find useful that I&#8217;d like to share, assuming you have the basics down: h, j, k, l, w, e, b, 0, $, %, g, G, i, I, a, A, o, O, v, y, d, c, r, p, P, and so on.</p>

<span id="more-628"></span>

<h5>Use f to move to a specific place in a line</h5>

<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> quickExpr <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^(?:[^&lt;]*(&lt;[\w\W]+&gt;)[^&gt;]*$|#([\w\-]+)$)/</span><span style="color: #339933;">;</span></div></div>

<p>To move to the second &#8216;w&#8217; in this line (with your cursor at the start of the line), type <em>fwfw</em><br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_03.html#03.3">[vimdoc] moving to a character</a></p>

<h5>Use tabs and splits</h5>
<p>As important as learning to create splits and tabs is getting comfortable navigating between them.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_08.html">[vimdoc] splitting windows</a><br />
<a href="http://vimdoc.sourceforge.net/htmldoc/tabpage.html">[vimdoc] tabpage</a></p>

<h5>Mark your place</h5>
<p>Let&#8217;s say you are working on one place of a long file and need to navigate to another place in the file, but eventually need to come back to the current location. Mark the current location by typing <em>mm</em> (<em>m</em> followed by any character) and move around the file at will. Once you&#8217;ve done your thing, type <em>&#8216;m</em> (replace <em>m</em> here with the character you chose before) to move your cursor back to where you marked before. This saves a lot of time as well as cognitive cycles.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_03.html#03.10">[vimdoc] using marks</a></p>

<h5>Get rid of the suck by recording commands</h5>
<p>Ever find yourself repeating the same keystrokes over and over? Type <em>qq</em>. Do your keystrokes. Type <em>q</em>. Move to where you want the keystrokes repeated and type <em>@q</em>. Go ahead and try <em>10@q</em> or even <em>100@q</em>. If you choose your keystrokes carefully, your recorded commands can be quite adaptive.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_10.html#10.1">[vimdoc] record and playback commands</a></p>

<h5>:mksession</h5>
<p>If you like gvim but get frustrated that <a href="http://www.gnu.org/software/screen/">screen</a> doesn&#8217;t play nice, :mksession is your answer! Also, :mksession is great for reloading all the files you have open.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_21.html#21.4">[vimdoc] sessions</a></p>

<h5>Move the view with z</h5>
<p>If you find your cursor at the top or bottom of the screen, just type <em>zz</em> or <em>zt</em> to scroll so that your cursor is at the middle and top of the screen respectively. This is useful when you search for a function name but the function ends up at the bottom of your viewport.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/usr_03.html#03.7">[vimdoc] scrolling around</a></p>

<h5>Complete your word with ctrl-p</h5>
<p>While in insert mode, press <em>ctrl-p</em> to complete a word that already appears in your open files. If there are multiple possibilities, vim lets you select the correct one from a dropdown.<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/insert.html#compl-generic">[vimdoc] completing keywords from different sources</a></p>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/11/taking-vim-to-the-next-level/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My last four years</title>
		<link>http://in.somniac.me/2010/06/my-last-four-years/</link>
		<comments>http://in.somniac.me/2010/06/my-last-four-years/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 18:34:46 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[CMU]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=513</guid>
		<description><![CDATA[I am done with my undergraduate education. These last four years have gone by quickly and the following is a short retrospective on both my personal and academic life. The following are the best classes I&#8217;ve taken at CMU; I learned something during these classes and enjoyed it too. 15-251 Great Theoretical Ideas in Computer [...]]]></description>
			<content:encoded><![CDATA[<p>I am done with my undergraduate education. These last four years have gone by quickly and the following is a short retrospective on both my personal and academic life.</p>

<p>The following are the best classes I&#8217;ve taken at CMU; I learned something during these classes and enjoyed it too.</p>

<ul>
<li>15-251 Great Theoretical Ideas in Computer Science (<a href="http://www.cs.cmu.edu/~biglou/">von Ahn</a>)</li>
<li>15-410 Operating System Design and Implementation (<a href="http://www.cs.cmu.edu/~davide/">Eckhardt</a>)</li>
<li>57-209 The Beatles (<a href="http://www.stephenschultz.net/">Schultz</a>)</li>
<li>60-412 Interactive Art &amp; Computational Design (<a href="http://flong.com">Levin</a>)</li>
</ul>

<p>In general, I found more classes annoying than interesting, more tedious than educational, but I guess it&#8217;s all part of the process. I met and interacted with lot of cool students and professors from whom I learned both personally and academically. I really enjoyed my independent studies with <a href="http://www.paulos.net/">Eric Paulos</a> and <a href="http://www.andrew.cmu.edu/user/slr/">Stacie Rohrbach</a>. I question my decision to receive my HCI degree but if nothing else, I met a number of neat people with similar interests. I was a purely technical student coming out of high school (math and sciences) but that definitely changed over the last four years as I poked around the design spectrum.</p>

<span id="more-513"></span>

<p>I got a bunch of teaching experience, year and half of tutoring and another year and half of TAing. This was definitely a cause of lot of frustrations: grading, bad professors, and students who didn&#8217;t care about the subject matter, only about getting the homework completed. But it also felt right interacting with the students who did care, definitely something I want to pursue in the future.</p>

<p>I will never regret my decision to join <a href="http://cmusoundbytes.com">Soundbytes</a>, my a cappella group, from semester one. I met some of the coolest people I know in the group and really enjoyed being a part of something family-like. We had our ups-and-downs but that&#8217;s all part of the ride.</p>

<p>With the CMU name tag, I was able to score nice summer internships at Apple and Facebook. My summers provided great exposure to the industry as well as the west coast. In August, I&#8217;ll be starting full-time as a User Interface Engineer at Facebook, more or less continuing from last summer.</p>

<p>I don&#8217;t know if I&#8217;m going to return to academia in the future, perhaps for a media arts program or what not, but I&#8217;m ready to move on after classes. There&#8217;s something exciting about school, with all your projects, deadlines, and social life as well. But I&#8217;m ready for the post-college life. Let&#8217;s see what happens.</p>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/06/my-last-four-years/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Go to Yosemite</title>
		<link>http://in.somniac.me/2010/05/go-to-yosemite/</link>
		<comments>http://in.somniac.me/2010/05/go-to-yosemite/#comments</comments>
		<pubDate>Wed, 26 May 2010 04:24:57 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=526</guid>
		<description><![CDATA[<p><a href="http://in.somniac.me/2010/05/go-to-yosemite/"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8535-385x256.jpg" alt="" title="IMG_8535" width="385" height="256" class="alignnone size-medium wp-image-596 grid-vertical-align" /></a></p>

<p>After graduation weekend, a couple of my friends and I took a trip to Yosemite National Park. We had a great time so I thought I'd jot down some notes for future travelers. I could tell you why you should go but I'm sure the internet has already done better.</p>]]></description>
			<content:encoded><![CDATA[<p class="span-2">After graduation weekend, a couple of my friends and I took a trip to Yosemite National Park. We had a great time so I thought I&#8217;d jot down some notes for future travelers. I could tell you why you should go but I&#8217;m sure the internet has already done better.</p>

<a class="span-3" href="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8535.jpg"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8535-585x390.jpg" alt="" title="IMG_8535" width="585" height="390" class="alignnone size-large wp-image-596" /></a> <span id="more-526"></span>

<div class="contain-2">
<h3>Transportation</h3>
<p>Our schedule into Yosemite was as follows:</p>
<ul>
	<li>Fly into SFO, arrive Monday 10:30am PDT.</li>
	<li>Take <a href="http://www.bart.gov/">BART</a> to Embarcadero station.</li>
	<li>Chill around the city.</li>
	<li>Take <a href="http://www.amtrak.com">Amtrak</a> bus from Ferry Building to Emeryville at 5:30pm, where we caught a train to Merced.</li>
	<li>Stay the night at Quality Inn.</li>
	<li>Next morning at 9am, catch the <a href="http://www.yarts.com/">YARTS</a> shuttle from the Merced Transportation station.</li>
	<li>Arrive at Yosemite a little before noon.</li>
</ul>
<p>Of course, driving is probably more convenient but if you aren&#8217;t, this schedule served really well. All the transportation we took were on-time. The Amtrak station by the Ferry Building will hold your bags while you explore the city for $3 a piece. The Quality Inn was cheap and had very cozy accommodations (2 queen beds) and also drove us to and from the Merced Amtrak/Transportation stations. Coming back, we took the YARTS/Amtrak/plane all in the same day. Inside the park, the valley shuttle was reliable and got us around. Also want to shout out two great eats in SF: Hong Kong Clay Pot Restaurant in Chinatown and Sotto Mare in North Beach.</p>
</div>

<div class="span-5"></div>
<a class="span-3" href="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8684.jpg"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8684-585x390.jpg" alt="" title="IMG_8684" width="585" height="390" class="alignnone size-large wp-image-597" /></a>
<div class="contain-2">
<h3>Housingkeeping Camp</h3>
<p>We stayed at the Housekeeping Camp inside the park, mostly because it was the only place available when we looked for accommodations. But having more choices now, I wouldn&#8217;t have chose a different place. It&#8217;s a pseudo-camping experience where everything is prepared for you. The showers have hot water and the restrooms are clean. It&#8217;s more or less a cop-out of actually camping but nonetheless, it&#8217;s a nice introduction for non-campers.</p>
<p>We made a campfire every night and cooked every dinner, part of what made the trip so fun. It was extremely, extremely cold at night; bring more clothes than you need so you can wear layers. You can buy almost anything you need at the stores inside the park and they are reasonably priced (slightly more expensive than your local grocery store but that&#8217;s expected). If you want to buy steaks, get to the main Village Store early (before 5pm) or they might run out.</p>
<h3>Activities</h3>
<ul>
	<li>Short Lower Yosemite Falls Trail</li>
	<li>Mist Trail to the top and back via John Muir Trail</li>
	<li>Bike around the valley floor</li>
	<li>Mirror Lake trail</li>
	<li>The west-most portion of the Valley Floor loop</li>
</ul>
<p>We did a lot of walking/hiking. Unfortunately, the cables to Half Dome weren&#8217;t up but the Mist Trail is still a must-do. We were at the park on weekdays but it was still filled with people. I&#8217;m afraid of what the park would look like on weekends, especially further into the summer.</p>
</div>
<a class="span-3" href="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8898.jpg"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8898-585x878.jpg" alt="" title="IMG_8898" width="585" height="878" class="alignnone size-large wp-image-598" /></a>
<a class="span-2 gap-2" href="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8842.jpg"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8842-385x256.jpg" alt="" title="IMG_8842" width="385" height="256" class="alignnone size-medium wp-image-600" /></a>
<a class="span-2" href="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8605.jpg"><img src="http://in.somniac.me/wp-content/uploads/2010/05/IMG_8605-385x578.jpg" alt="" title="IMG_8605" width="385" height="578" class="alignnone size-medium wp-image-601" /></a>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/05/go-to-yosemite/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using OpenGL to calculate transformations</title>
		<link>http://in.somniac.me/2010/03/using-opengl-to-calculate-transformations/</link>
		<comments>http://in.somniac.me/2010/03/using-opengl-to-calculate-transformations/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 00:37:02 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=490</guid>
		<description><![CDATA[For my final art project, I&#8217;m working on programmatically generating scenes to be rendered in Sunflow. Lot of the work is placing objects where I want them. The following is just a way to use OpenGL to do your matrix multiplications and transformations. glMatrixMode&#40;GL_MODELVIEW&#41;; glPushMatrix&#40;&#41;; glLoadIdentity&#40;&#41;; // transformations go here GLfloat modelMatrix&#91;16&#93;; glGetFloatv &#40;GL_MODELVIEW_MATRIX, modelMatrix&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p class="span-2 prepend-1">For my final art project, I&#8217;m working on programmatically generating scenes to be rendered in Sunflow. Lot of the work is placing objects where I want them. The following is just a way to use OpenGL to do your matrix multiplications and transformations.</p>

<div class="codecolorer-container cpp default grid-vertical-align" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">glMatrixMode<span style="color: #008000;">&#40;</span>GL_MODELVIEW<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glPushMatrix<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glLoadIdentity<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #666666;">// transformations go here</span><br />
<br />
GLfloat modelMatrix<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
glGetFloatv <span style="color: #008000;">&#40;</span>GL_MODELVIEW_MATRIX, modelMatrix<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glPopMatrix<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></div>

<span id="more-490"></span>

<div class="contain-2 prepend-1">
<p>Transformation functions: <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml">glTranslate</a>, <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml">glRotate</a>, <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml">glScale</a>, <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml">glMultMatrix</a></p>

<p>The returned array is a column-major representation of a 4&#215;4 matrix. This<a href="http://glprogramming.com/red/chapter03.html#name2"> section of the OpenGL guide</a> is a good reference for remembering in which order to apply transformations.</p>
</div>

<div class="contain-5 gap-3"></div>
<p class="span-2 prepend-1">For example, if I want to translate an object by (3,4,5) and then rotate it 45 degrees around the z-axis, I would use the following code to retrieve the transformation matrix. Notice the order of the transformation functions.</p>

<div class="codecolorer-container cpp default grid-vertical-align" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">glMatrixMode<span style="color: #008000;">&#40;</span>GL_MODELVIEW<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glPushMatrix<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glLoadIdentity<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
glRotatef<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">45</span>, <span style="color: #0000dd;">0</span>, <span style="color: #0000dd;">0</span>, <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glTranslatef<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">3</span>, <span style="color: #0000dd;">4</span>, <span style="color: #0000dd;">5</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
GLfloat modelMatrix<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
glGetFloatv <span style="color: #008000;">&#40;</span>GL_MODELVIEW_MATRIX, modelMatrix<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
glPopMatrix<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> j <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> j <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">;</span> j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%f &quot;</span>, modelMatrix<span style="color: #008000;">&#91;</span>j <span style="color: #000040;">*</span> <span style="color: #0000dd;">4</span> <span style="color: #000040;">+</span> i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>

<div class="contain-2 prepend-1">
<p>The code to the right outputs the following:</p>
<pre class="span-2">
0.707107 -0.707107 0.000000 -0.707107
0.707107  0.707107 0.000000  4.949748
0.000000  0.000000 1.000000  5.000000
0.000000  0.000000 0.000000  1.000000
</pre>
</div>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/03/using-opengl-to-calculate-transformations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impressions with the Canon S90</title>
		<link>http://in.somniac.me/2010/03/first-impressions-with-the-canon-s90/</link>
		<comments>http://in.somniac.me/2010/03/first-impressions-with-the-canon-s90/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 05:00:32 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=461</guid>
		<description><![CDATA[<p>For my last college spring break, a group of my friends and I took a trip to Puerto Rico. I thought this was a good excuse to purchase my first compact camera. After doing a good amount of browsing, I settled with the <a href="http://www.amazon.com/gp/product/B002LITT42?ie=UTF8&#038;tag=insomniac-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B002LITT42">Canon S90</a><img src="http://www.assoc-amazon.com/e/ir?t=insomniac-20&#038;l=as2&#038;o=1&#038;a=B002LITT42" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.</p>

<p class="grid-vertical-align"><a href="http://www.flickr.com/photos/paulshen/4449248024/" title="Margot &#38; the Nuclear So and So's by paulshen, on Flickr"><img src="http://farm3.static.flickr.com/2683/4449248024_32d6bc0a4d.jpg" width="385" alt="Margot &#38; the Nuclear So and So's" /></a></p>]]></description>
			<content:encoded><![CDATA[<div class="contain-2 prepend-1">
<p>For my last college spring break, a group of my friends and I took a trip to Puerto Rico. I thought this was a good excuse to purchase my first compact camera. After doing a good amount of browsing, I settled with the <a href="http://www.amazon.com/gp/product/B002LITT42?ie=UTF8&#038;tag=insomniac-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B002LITT42">Canon S90</a><img src="http://www.assoc-amazon.com/e/ir?t=insomniac-20&#038;l=as2&#038;o=1&#038;a=B002LITT42" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.</p>

<h3>Size</h3>
<p>The size of this camera is perfect. In fact, the size was what made this an easy choice over the <a href="http://www.amazon.com/gp/product/B001CCLBSA?ie=UTF8&#038;tag=insomniac-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B001CCLBSA">Panasonic LX3</a><img src="http://www.assoc-amazon.com/e/ir?t=insomniac-20&#038;l=as2&#038;o=1&#038;a=B001CCLBSA" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. As good as the S80 was, the camera was just not convenient to carry around. The S90 slips in and out of my pocket and there&#8217;s no lens cap to worry about (something the LX3 has). Again, if nothing else, the small size of the S90 is easily a deciding factor versus most advanced compacts. If the scenario screams for image quality, I&#8217;ll shoot with my SLR.</p>

<h3>Image Quality</h3>
<p>I was somewhat relieved to find the image quality not as good as my Canon Rebel XT or I think I would have been quite sad, although not too surprised. There is significant noise even around ISO 400. I was surprised by the number of ISO increments starting from 80 up to 3200, with two settings between each each multiple of two, e.g. 200, 250, 320, 400. The camera shoots RAW, something I really appreciate. Additionally, the camera has image stabilization, which I assume helps with the longer exposures.</p>

<p>The S90 has a fast lens with a maximum aperture of f/2.0 but at the long end, the lens only opens up to f/4.9. The camera has a 35mm zoom range of 28mm to 105mm, which is quite versatile. I find my personality tends to feel home in the 20-50mm range so this camera satisfies my wide-angle desires. And with the wide aperture comes all its advantages, including having good video capture. Yes, the S90 does not do HD videos but it definitely performs well in low light situations.</p>

<h3>Interface and Operation</h3>
<p>The control ring in front of the camera is interesting. It&#8217;s not as radically useful as I had hoped but it serves as another dial input, which is always welcome. For my personal settings, I let the control dial in front of the camera control aperture while the traditional dial controls exposure. There is a customizable shortcut button, which I assign to ISO. These settings are for aperture priority, which is how I usually shoot. Overall, the interface and controls are intuitive. As with the S80, I think the dial controls make navigation and selection easier, and having two of them just makes it better.</p>

<h3>Notable</h3>
<p>The camera has a beautiful 3&#8243; LCD screen. The colors are vivid and the resolution is sharp. My friends commented that my pictures looked better than theirs if no reason other than the screen itself. The camera also looks nice; it&#8217;s black all around and has a clean feel. I use a 3&#8243; GGS screen protector to cover the LCD screen, which seems to work well.</p>

<p>Overall, I&#8217;m quite satisfied with the purchase. There isn&#8217;t anything that I can point out that would deter me from making the same purchase.</p>

<p>And if you&#8217;re at all inclined to check it out, here&#8217;s a link to the <a href="http://www.amazon.com/gp/product/B002LITT42?ie=UTF8&#038;tag=insomniac-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B002LITT42">Canon PowerShot S90</a><img src="http://www.assoc-amazon.com/e/ir?t=insomniac-20&#038;l=as2&#038;o=1&#038;a=B002LITT42" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> on Amazon. Yes, okay, it&#8217;s a referral link.</p>
</div>

<a href="http://www.flickr.com/photos/paulshen/4449248024/" title="Margot &amp; the Nuclear So and So's by paulshen, on Flickr" class="span-2"><img src="http://farm3.static.flickr.com/2683/4449248024_32d6bc0a4d.jpg" width="385" height="289" alt="Margot &amp; the Nuclear So and So's"  /></a>
<a href="http://www.flickr.com/photos/paulshen/4439070663/" title="Untitled by paulshen, on Flickr" class="span-1"><img src="http://farm5.static.flickr.com/4023/4439070663_61b5b1a3ec_m.jpg" width="185" height="247" alt="" /></a>
<a href="http://www.flickr.com/photos/paulshen/4440997506/" title="Untitled by paulshen, on Flickr" class="span-1"><img src="http://farm5.static.flickr.com/4065/4440997506_ff707317d9_m.jpg" width="185" height="247" alt="" /></a>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/03/first-impressions-with-the-canon-s90/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Augmenting with optical flow</title>
		<link>http://in.somniac.me/2010/03/augmenting-optical-flow/</link>
		<comments>http://in.somniac.me/2010/03/augmenting-optical-flow/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 05:07:25 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=433</guid>
		<description><![CDATA[<object width="385" height="289"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9856570&#38;server=vimeo.com&#38;show_title=1&#38;show_byline=0&#38;show_portrait=0&#38;color=00ADEF&#38;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9856570&#38;server=vimeo.com&#38;show_title=1&#38;show_byline=0&#38;show_portrait=0&#38;color=00ADEF&#38;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="385" height="289"></embed></object>

<p>From <a href="http://en.wikipedia.org/wiki/Optical_flow">Wikipedia</a>,</p>

<blockquote>Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer (an eye or a camera) and the scene.</blockquote>

<p>The video above augments a water drop with a fluid simulation activated by the water's optical flow. Meta, if you will. In a way, the augmentation shows something that is present but invisible, specifically the derivatives of the motion, the forces acting on the water.  The water drop <a href="http://www.youtube.com/watch?v=WCSuyCPfHCY">source video</a> is on YouTube.</p>]]></description>
			<content:encoded><![CDATA[<div class="contain-2"><p>From <a href="http://en.wikipedia.org/wiki/Optical_flow">Wikipedia</a>,</p>

<blockquote>Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer (an eye or a camera) and the scene.</blockquote>

<p>The video above augments a water drop with a fluid simulation activated by the water&#8217;s optical flow. Meta, if you will. In a way, the augmentation shows something that is present but invisible, specifically the derivatives of the motion, the forces acting on the water.  The water drop <a href="http://www.youtube.com/watch?v=WCSuyCPfHCY">source video</a> is on YouTube.</p>

<p>In mathematics and physics, we&#8217;re often concerned with derivatives, the rates of change. If we represent <em>x</em> as the position of a particle, <em>d&#8217;(x)</em> represents its velocity and <em>d&#8221;(x)</em> represents the particle&#8217;s acceleration. In the physical world, at any point of time, we see <em>x</em>, the instantaneous position of any object. But the world is not static; things are constantly moving, whether affected by natural forces or a consequence of our actions and decisions. This project makes visible the <em>d&#8217;(x)</em>, the change of position, with a fluid simulation. There&#8217;s something beautiful about continuity.</p>
</div>

<object width="585" height="439"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9856570&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9856570&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="585" height="439"></embed></object>

<div class="span-5 gap-3"></div>
<h3>Other Videos</h3>

<div>
<object width="385" height="289"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9868131&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9868131&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="385" height="289"></embed></object>

<p>Source video: <a href="http://www.youtube.com/watch?v=Q8nSUBcYk5w">Swan Lake Odette Variation (Svetlana Zakharova)</a></p>
</div>

<object width="385" height="289"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9874974&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9874974&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="385" height="289"></embed></object>

<div class="span-5 gap-3"></div>
<h3>Implementation</h3>

<div class="contain-2">
<p>The fluid simulation is provided by the openFramework library <a href="http://code.google.com/p/ofxmsaof/source/browse/#svn/trunk">ofxMSAFluid</a>.</p>

<p>The program uses the cvCalcOpticalFlowBM function of openCv, which provides two CvMat&#8217;s of derivatives (dx and dy) for a set number of points. For input, the function takes two CvImage&#8217;s, one for the previous frame and one for the current frame.</p>
</div>

<div class="span-5"></div>
<p class="span-1">The following code extracts the derivatives from the CvMat into double arrays.</p>

<div class="codecolorer-container cpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">void</span> ofxCvOpticalFlowBM<span style="color: #008080;">::</span><span style="color: #007788;">getField</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">double</span> <span style="color: #000040;">*</span> dx, <span style="color: #0000ff;">double</span> <span style="color: #000040;">*</span> dy<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> y <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> y <span style="color: #000080;">&lt;</span> rows<span style="color: #008080;">;</span> y<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> x <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> x <span style="color: #000080;">&lt;</span> cols<span style="color: #008080;">;</span> x<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dx<span style="color: #008000;">&#91;</span>y <span style="color: #000040;">*</span> cols <span style="color: #000040;">+</span> x<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> cvGetReal2D <span style="color: #008000;">&#40;</span>vel_x, y, x<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dy<span style="color: #008000;">&#91;</span>y <span style="color: #000040;">*</span> cols <span style="color: #000040;">+</span> x<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> cvGetReal2D <span style="color: #008000;">&#40;</span>vel_y, y, x<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></div>

]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/03/augmenting-optical-flow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The central dimension of human personality</title>
		<link>http://in.somniac.me/2010/02/the-central-dimension-of-human-personality/</link>
		<comments>http://in.somniac.me/2010/02/the-central-dimension-of-human-personality/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 01:45:49 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://in.somniac.me/?p=389</guid>
		<description><![CDATA[<p>This project is an attempt to create something beautiful and organic by modeling (and perhaps critiquing) the interaction between introverts and extraverts.</p>

<p class="grid-vertical-align"><a href="http://in.somniac.me/2010/02/14/the-central-dimension-of-human-personality/" rel="attachment wp-att-419"><img src="http://in.somniac.me/wp-content/uploads/2010/02/introvert_2-385x288.png" alt="" title="introvert_2" width="385" height="288" class="alignnone size-medium wp-image-602" /></a></p>]]></description>
			<content:encoded><![CDATA[<p class="span-2">This project is an attempt to create something beautiful and organic by modeling (and perhaps critiquing) the interaction between introverts and extraverts.</p>

<a href="http://in.somniac.me/wp-content/uploads/2010/02/introvert_2.png" class="span-3"><img src="http://in.somniac.me/wp-content/uploads/2010/02/introvert_2-585x438.png" alt="" title="introvert_2" width="585" height="438" class="alignnone size-large wp-image-602" /></a>

<div class="contain-2">
<p>From <a href="http://en.wikipedia.org/wiki/Extraversion_and_introversion">Wikipedia</a></p>

<blockquote>The trait of extraversion-introversion is a central dimension of human personality. Extraverts (also spelled extroverts) tend to be gregarious, assertive, and interested in seeking out excitement. Introverts, in contrast, tend to be more reserved, less outgoing, and less sociable. They are not necessarily loners but they tend to have smaller circles of friends and are less likely to thrive on making new social contacts. Introverts are less likely to seek stimulation from others because their own thoughts and imagination are stimulating enough. A common misconception is that all introverts suffer from social anxiety or shyness. Introversion does not describe social discomfort but rather social preference. An introvert may not be shy  at all but may merely prefer non social or less social activities.</blockquote>
</div>

<div class="span-5"></div>
<div class="contain-2">
<h3>Introversion</h3>

<p>One of the best things I did for myself was understand my tendency towards introversion. It&#8217;s a world dominated by extraverts, not necessarily in numbers but in social influence. For those interested, I highly recommend <a href="http://www.theatlantic.com/doc/200303/rauch">this column</a>. One interesting point is that the natural behavior of extraverts lead them to dominate public life. I don&#8217;t believe this is anyone&#8217;s fault; it&#8217;s just how it plays out.</p>

<p>To convey this point, I modeled introverts and extraverts, letting them interact and roam free.</p>
</div>

<object width="585" height="439"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9405244&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9405244&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="585" height="439"></embed></object>

<div class="contain-2">
<h3>Modeling Behavior</h3>

<p>Each &#8220;being&#8221; has a set of random genes. Extraverts tend to move more while introverts take smaller steps. After a &#8220;meeting period&#8221; (basically when two beings are nearby for a set amount of time), the two beings learn each other&#8217;s genes. Then, the two beings develop an attraction or repulsion; the forces can be different for each. Extraverts are more likely to develop an attraction while introverts develop stronger bonds with the ones they are attracted to. Also, introverts are more likely to be repulsed by other beings.</p>

<p>I modeled this behavior based more or less on myself (and therefore how I believe introverts interact). I am usually hesitant to explore and meet new people. The people I like I treasure a lot, but these number relatively few. I usually prefer alone time to time with acquaintances or people I don&#8217;t find particularly special (in my opinion).</p>

<p>The results were as expected with very minor tweaking. Because the extraverts are likely to develop more social relationships and introverts likely to distance themselves, the extraverts tend to dominate the heart of the social scene.</p>

<h3>Implementation</h3>

<p>Continuing with my experimentation with <a href="http://openframeworks.cc">openFrameworks</a>, I found oF did everything needed for this project. Because Processing has been around, it has significantly more libraries, many immensely useful. However, for projects without external components, I find developing in openFrameworks none slower and I also assume C++ gives it a significant runtime advantage.</p>

<p>See also my <a href="http://in.somniac.me/2010/01/30/generative-arcs/">quick sketch</a> which led to this visual form.</p>

<h3>Relevant/Process Videos</h3>
<ul>
<li><a href="http://www.vimeo.com/9454796">Generative arcs</a></li>
<li><a href="http://www.vimeo.com/9454725">Flocking behavior</a></li>
<li><a href="http://www.vimeo.com/9454725">The Central Dimension of Human Personality (arcs)</a></li>
</ul>
</div>

<a href="http://in.somniac.me/wp-content/uploads/2010/02/introvert_3.png" class="span-3"><img src="http://in.somniac.me/wp-content/uploads/2010/02/introvert_3-585x438.png" alt="" title="introvert_3" width="585" height="438" class="alignnone size-large wp-image-604" /></a>

<a href="http://in.somniac.me/wp-content/uploads/2010/02/introvert_1.png" class="span-3"><img src="http://in.somniac.me/wp-content/uploads/2010/02/introvert_1-585x438.png" alt="" title="introvert_1" width="585" height="438" class="alignnone size-large wp-image-605" /></a>]]></content:encoded>
			<wfw:commentRss>http://in.somniac.me/2010/02/the-central-dimension-of-human-personality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

