<?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>Todd Vanderlin &#187; vectors</title>
	<atom:link href="http://vanderlin.cc/tag/vectors/feed/" rel="self" type="application/rss+xml" />
	<link>http://vanderlin.cc</link>
	<description>Design &#38; Technology</description>
	<lastBuildDate>Tue, 15 May 2012 18:41:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Portrait Pixel Flow</title>
		<link>http://vanderlin.cc/2010/02/portrait-pixel-flow/</link>
		<comments>http://vanderlin.cc/2010/02/portrait-pixel-flow/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 17:49:13 +0000</pubDate>
		<dc:creator>Todd Vanderlin</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[flow]]></category>
		<category><![CDATA[openframeworks]]></category>
		<category><![CDATA[pixels]]></category>
		<category><![CDATA[portraits]]></category>
		<category><![CDATA[vectors]]></category>

		<guid isPermaLink="false">http://toddvanderlin.com/?p=1706</guid>
		<description><![CDATA[Been doing some testing to find the flow of pixels in portraits. Above are a few attempts to find vectors in pixels based on surrounding pixels. In video this is achieved by simple comparing current frames to previous frames then calculating the velocity of the different pixels. Here I want to find the general flow ...]]></description>
			<content:encoded><![CDATA[<p><a class="lightview" rel="gallery[pixelflowport]" title="Einstein Face Vectors" href="http://farm5.static.flickr.com/4020/4324559832_58f75ececd_b.jpg"><br />
<img title="Einstein Face Vectors" src="http://farm5.static.flickr.com/4020/4324559832_58f75ececd.jpg"/><br />
</a><a class="lightview" rel="gallery[pixelflowport]" title="Einstein Face Vectors" href="http://farm5.static.flickr.com/4049/4324144796_eba47a7612_b.jpg"><br />
<img title="Einstein Face Vectors" src="http://farm5.static.flickr.com/4049/4324144796_eba47a7612.jpg"/><br />
</a><a class="lightview" rel="gallery[pixelflowport]" title="Obama Face Vectors" href="http://farm3.static.flickr.com/2774/4323379875_6a73e197fc_b.jpg"><br />
<img title="Obama Face Vectors" src="http://farm3.static.flickr.com/2774/4323379875_6a73e197fc.jpg"/><br />
</a><br />
Been doing some testing to find the flow of pixels in portraits. Above are a few attempts to find vectors in pixels based on surrounding pixels. In video this is achieved by simple comparing current frames to previous frames then calculating the velocity of the different pixels. Here I want to find the general flow of pixels through the image. The goal is to then have particles stream through the image to generate a representation of the image, some type of generative stipple drawing.  </p>
<p>See large image <a href="http://farm5.static.flickr.com/4020/4324559832_41c0d3fc45_o.jpg" class="lightview" rel="gallery['1706']"">here</a><br />
Original Einstein image <a href="http://dyslexiavictoria.files.wordpress.com/2009/06/albert-einstein1.jpg" class="lightview" rel="gallery['1706']"">here</a><br />
Original Obama image <a href="http://scrapetv.com/News/News%20Pages/Politics/images-2/obama-close-up.jpg" class="lightview" rel="gallery['1706']"">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://vanderlin.cc/2010/02/portrait-pixel-flow/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Normals</title>
		<link>http://vanderlin.cc/2009/09/normals/</link>
		<comments>http://vanderlin.cc/2009/09/normals/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 23:36:45 +0000</pubDate>
		<dc:creator>Todd Vanderlin</dc:creator>
				<category><![CDATA[experiment]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[normals]]></category>
		<category><![CDATA[openframeworks]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[vectors]]></category>

		<guid isPermaLink="false">http://toddvanderlin.com/?p=1616</guid>
		<description><![CDATA[Finally got normals working for the height map. Brad helped me a ton with the math, thanks brad :). After making sure I had the right points its was pretty simple. Here is an example to calculate normals for a grid in OpenFrameworks. Obviously this can be applied to any other language. The image above ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/vanderlin/3945248323/" title="Normals Sphere by Vanderlin, on Flickr"><img src="http://farm4.static.flickr.com/3423/3945248323_769de53bca_z.jpg" width="640" height="400" alt="Normals Sphere" /></a><br />
Finally got normals working for the height map. Brad helped me a ton with the math, thanks brad :). After making sure I had the right points its was pretty simple. </p>
<p>Here is an example to calculate normals for a grid in OpenFrameworks. Obviously this can be applied to any other language.<br />
<img src="http://toddvanderlin.com/cms/wp-content/uploads/2009/09/grid.png" alt="grid" title="grid" /></p>
<p>The image above we have four points on a plane. We need three of those points:</p>
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;">ofxVec3f p1<span class="br0">&#40;</span>x1, y1, z1<span class="br0">&#41;</span><span class="sy4">;</span><br />
ofxVec3f p2<span class="br0">&#40;</span>x2, y2, z2<span class="br0">&#41;</span><span class="sy4">;</span><br />
ofxVec3f p3<span class="br0">&#40;</span>x3, y3, z3<span class="br0">&#41;</span><span class="sy4">;</span></div>
</div>
<p>We now need a vector from p1 to p2 and p1 to p3.</p>
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;">ofxVec3f v1 <span class="sy1">=</span> p1 <span class="sy2">-</span> p2<span class="sy4">;</span><br />
ofxVec3f v2 <span class="sy1">=</span> p1 <span class="sy2">-</span> p3<span class="sy4">;</span></div>
</div>
<p>We need the cross product of v1 and v2. This will give us our normal vector. Next we normalize that vector scale it and add p1.</p>
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;">ofxVec3f normalVec <span class="sy1">=</span> v1.<span class="me1">cross</span><span class="br0">&#40;</span>v2<span class="br0">&#41;</span><span class="sy4">;</span><br />
normalVec.<span class="me1">normalize</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy4">;</span><br />
normalVec <span class="sy2">*</span><span class="sy1">=</span> <span class="nu16">50.0</span><span class="sy4">;</span><br />
normalVec <span class="sy2">+</span><span class="sy1">=</span> p1<span class="sy4">;</span></div>
</div>
<p>Now render from p1 to normal vector.</p>
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;">ofSetColor<span class="br0">&#40;</span>255, 0, 0<span class="br0">&#41;</span><span class="sy4">;</span><br />
glVertex3f<span class="br0">&#40;</span>normalVec.<span class="me1">x</span>, normalVec.<span class="me1">y</span>, normalVec.<span class="me1">z</span><span class="br0">&#41;</span><span class="sy4">;</span><br />
glVertex3f<span class="br0">&#40;</span>p1.<span class="me1">x</span>, p1.<span class="me1">y</span>, p1.<span class="me1">z</span><span class="br0">&#41;</span><span class="sy4">;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://vanderlin.cc/2009/09/normals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

