<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3899530684886737451</id><updated>2011-11-27T16:11:40.281-08:00</updated><category term='code'/><title type='text'>Thomas Sweeney</title><subtitle type='html'>Doing the wrong things at the right time.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pushingprimitives.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pushingprimitives.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Columbo</name><uri>http://www.blogger.com/profile/13962224066888361809</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_54hPbO5KlWQ/SRtxa0RfXGI/AAAAAAAAAfg/ImDxN89D_A0/s1600-R/mrbenn.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3899530684886737451.post-8440006224288106428</id><published>2008-10-19T10:49:00.000-07:00</published><updated>2008-10-19T11:20:05.826-07:00</updated><title type='text'>Frame Differencing</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_54hPbO5KlWQ/SPt0EwXFA5I/AAAAAAAAAV4/AoNvstXtuIU/s1600-h/capture1.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_54hPbO5KlWQ/SPt0EwXFA5I/AAAAAAAAAV4/AoNvstXtuIU/s400/capture1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5258924614935184274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Basic movement detection via frame differencing algorithm.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;I'm a little peeved at the absence of the 'Fused Media and Applications' module from this years curriculum. From what I can gather, the module covered OpenCV and OpenGL which are the two main API's I'm using for the application pictured above. Well, looks like I'll have to go it alone this year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3899530684886737451-8440006224288106428?l=pushingprimitives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pushingprimitives.blogspot.com/feeds/8440006224288106428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3899530684886737451&amp;postID=8440006224288106428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/8440006224288106428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/8440006224288106428'/><link rel='alternate' type='text/html' href='http://pushingprimitives.blogspot.com/2008/10/frame-differencing.html' title='Frame Differencing'/><author><name>Columbo</name><uri>http://www.blogger.com/profile/13962224066888361809</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_54hPbO5KlWQ/SRtxa0RfXGI/AAAAAAAAAfg/ImDxN89D_A0/s1600-R/mrbenn.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_54hPbO5KlWQ/SPt0EwXFA5I/AAAAAAAAAV4/AoNvstXtuIU/s72-c/capture1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3899530684886737451.post-3272994752794831875</id><published>2008-10-03T08:53:00.000-07:00</published><updated>2008-10-03T09:05:47.547-07:00</updated><title type='text'>Processing</title><content type='html'>Processing (http://processing.org) is incredibly easy as programing languges go. The sketch below took five minutes to write and debug.&lt;br /&gt;&lt;br /&gt;import processing.opengl.*;&lt;br /&gt;float angle1=0.1;&lt;br /&gt;float fillCol=0.0;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt; size(600,400,OPENGL);&lt;br /&gt; //noStroke();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void draw(){&lt;br /&gt; background(100);&lt;br /&gt; //lights();&lt;br /&gt; pointLight(256, 256, 256, fillCol, 200, 36);&lt;br /&gt; translate(300,200,-100);&lt;br /&gt;&lt;br /&gt;for (int i=0;i&lt;80;i++){&lt;br /&gt; pushMatrix();&lt;br /&gt; rotateY(sin(radians(fillCol))*-i);&lt;br /&gt; rotateX(cos(radians(angle1))*-fillCol);&lt;br /&gt; rotateZ(sin(radians(angle1))*-i);&lt;br /&gt; translate((2*i),2*i,2*1);&lt;br /&gt; box(i,i,20+i);&lt;br /&gt; //fill(10+(i*2));&lt;br /&gt; fill(i*2+50);&lt;br /&gt; popMatrix();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;angle1+=.15;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void mouseDragged(){&lt;br /&gt; fillCol=fillCol+0.1;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3899530684886737451-3272994752794831875?l=pushingprimitives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pushingprimitives.blogspot.com/feeds/3272994752794831875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3899530684886737451&amp;postID=3272994752794831875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/3272994752794831875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/3272994752794831875'/><link rel='alternate' type='text/html' href='http://pushingprimitives.blogspot.com/2008/10/processing.html' title='Processing'/><author><name>Columbo</name><uri>http://www.blogger.com/profile/13962224066888361809</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_54hPbO5KlWQ/SRtxa0RfXGI/AAAAAAAAAfg/ImDxN89D_A0/s1600-R/mrbenn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3899530684886737451.post-5808988661386658466</id><published>2008-10-03T08:32:00.000-07:00</published><updated>2008-10-03T08:52:08.263-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>Fast inverse square root</title><content type='html'>&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;float&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; InvSqrt (&lt;/span&gt;&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;float&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; x){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         float xhalf = 0.5f*x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         &lt;/span&gt;&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;int&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; i = *(&lt;/span&gt;&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;int&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;*)&amp;x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         i = 0x5f3759df - (i&gt;&gt;1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         x = *(&lt;/span&gt;&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;float&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;*)&amp;i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         x = x*(1.5f - xhalf*x*x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;         &lt;/span&gt;&lt;span style="color: rgb(0, 51, 153);font-family:courier new;" &gt;return&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Terribly quick (if less accurate) newton-raphson iteration. Handy for vector normalization, etc. Big thanks to Carmack et al.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3899530684886737451-5808988661386658466?l=pushingprimitives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pushingprimitives.blogspot.com/feeds/5808988661386658466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3899530684886737451&amp;postID=5808988661386658466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/5808988661386658466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3899530684886737451/posts/default/5808988661386658466'/><link rel='alternate' type='text/html' href='http://pushingprimitives.blogspot.com/2008/10/fast-inverse-square-root.html' title='Fast inverse square root'/><author><name>Columbo</name><uri>http://www.blogger.com/profile/13962224066888361809</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_54hPbO5KlWQ/SRtxa0RfXGI/AAAAAAAAAfg/ImDxN89D_A0/s1600-R/mrbenn.jpg'/></author><thr:total>0</thr:total></entry></feed>
