<?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>julapy &#187; processing</title>
	<atom:link href="http://www.julapy.com/blog/category/processing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.julapy.com/blog</link>
	<description>surfing on sine waves</description>
	<lastBuildDate>Thu, 05 Jan 2012 10:42:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>giffy meshy thingy</title>
		<link>http://www.julapy.com/blog/2011/08/24/giffy-meshy-thingy/</link>
		<comments>http://www.julapy.com/blog/2011/08/24/giffy-meshy-thingy/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:33:48 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=893</guid>
		<description><![CDATA[back on the 1bpp gif trail! originally i was using noise to warp text in a attempt to make captcha animations until this minimal aesthetic took my fancy. trick was to make the noise field loop on itself and i got there in the end by sampling two positions in the field at different times [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://julapy.com/1bpp/grid_01.gif" target="_blank"><img src="http://julapy.com/1bpp/grid_01.gif" alt="grid_01" /></a></p>
<p><span id="more-893"></span></p>
<p>back on the 1bpp gif trail!<br />
originally i was using noise to warp text in a attempt to make <a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank">captcha</a> animations until this minimal aesthetic took my fancy. trick was to make the noise field loop on itself and i got there in the end by sampling two positions in the field at different times and blending them together.</p>
<p><a href="http://julapy.com/1bpp/grid_02.gif" target="_blank"><img src="http://julapy.com/1bpp/grid_02.gif" alt="grid_01" /></a></p>
<p><a href="http://julapy.com/1bpp/grid_03.gif" target="_blank"><img src="http://julapy.com/1bpp/grid_03.gif" alt="grid_01" /></a></p>
<p><a href="http://julapy.com/1bpp/grid_04.gif" target="_blank"><img src="http://julapy.com/1bpp/grid_04.gif" alt="grid_01" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2011/08/24/giffy-meshy-thingy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>horizons</title>
		<link>http://www.julapy.com/blog/2010/12/09/horizons/</link>
		<comments>http://www.julapy.com/blog/2010/12/09/horizons/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 12:02:22 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=711</guid>
		<description><![CDATA[horizons is an interactive sound toy for the iPhone + iPad. it is an exploration of colour, sound and form. the design of the piece focuses on creating subtle colour refractions in a rich colour scape using an algorithmic process known as triangulation. fluidity of interaction is achieved using real-time physics made using the box2d [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/julapy/4903907181/" title="horizons by julapy, on Flickr"><img src="http://farm5.static.flickr.com/4079/4903907181_1c79e6ff7e.jpg" width="500" height="375" alt="horizons"></a></p>
<p><span id="more-711"></span></p>
<p><a href="http://www.julapy.com/horizons/" target="_blank">horizons</a> is an interactive sound toy for the iPhone + iPad. it is an exploration of colour, sound and form. the design of the piece focuses on creating subtle colour refractions in a rich colour scape using an algorithmic process known as triangulation. fluidity of interaction is achieved using real-time physics made using the <a href="http://www.box2d.org/" target="_blank">box2d</a> library. as always, made in <a href="http://www.openframeworks.cc/" target="_blank">openframeworks</a>.</p>
<p><iframe src="http://player.vimeo.com/video/14894081?title=0&amp;byline=0&amp;portrait=0&amp;color=ff0179" width="500" height="281" frameborder="0"></iframe></p>
<p>the project was a collaboration with <a href="http://gentleforce.angrypixel.org/" target="_blank">eli murray (gentleforce)</a> who worked on the amazing sound design. one comment on the app said, &#8220;its looks like it sounds&#8221; which i really enjoyed and think is a testement to eli&#8217;s great work in making the sound so tightly woven around the visuals.</p>
<p>suprisingly the app did really well in the app store seeing as it had no real purpose apart from being a pretty thing to look at and listen to. it made it to the featured section of the app store which needless to say boosted sales significantly and even though it didn&#8217;t come near to paying off the amount of effort that went into making it, it was actually nice to get paid for creating art once in a while!</p>
<p>here are some blogs and online publications that featured the horizons app,<br />
<a href="http://www.creativeapplications.net/iphone/horizons-iphone-ipad-of/">http://www.creativeapplications.net/iphone/horizons-iphone-ipad-of/</a><br />
<a href="http://www.lostateminor.com/2010/11/01/horizons-iphone-and-ipad-app/">http://www.lostateminor.com/2010/11/01/horizons-iphone-and-ipad-app/</a><br />
<a href="http://www.desktopmag.com.au/project-wall/horizons/">http://www.desktopmag.com.au/project-wall/horizons/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2010/12/09/horizons/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>dusk @ underbelly</title>
		<link>http://www.julapy.com/blog/2010/08/05/dusk-underbelly/</link>
		<comments>http://www.julapy.com/blog/2010/08/05/dusk-underbelly/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 14:05:59 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=610</guid>
		<description><![CDATA[dusk is an interactive installation exhibited at the underbelly arts festival which draws upon the connections between people, technology and environment. participants engage with tiny creatures of light which respond to movement, flock around to avoid rocks, follow the queen and take refuge in a tree. ive been doing a bit of work lately with [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/13474272?title=0&amp;byline=0&amp;portrait=0&amp;color=ff0179" width="500" height="281" frameborder="0"></iframe></p>
<p><span id="more-610"></span></p>
<p>dusk is an interactive installation exhibited at the <a href="http://underbellyarts.com.au/2010/" target="_blank">underbelly arts festival</a> which draws upon the connections between people, technology and environment. participants engage with tiny creatures of light which respond to movement, flock around to avoid rocks, follow the queen and take refuge in a tree.</p>
<p>ive been doing a bit of work lately with the chaps from <a href="http://angrypixel.org/" target="_blank">angryPixel</a> (<a href="http://kodama.angrypixel.org/" target="_blank">scott brown</a> and <a href="http://gentleforce.angrypixel.org/" target="_blank">eli murray</a>) and this has been the first interactive installation we&#8217;ve worked on collectively. we all have our own individual skill sets and have been able to contribute to the project in unique and complemantry ways. everything was tied together through the magic of <a href="http://en.wikipedia.org/wiki/Open_Sound_Control" target="_blank">OSC</a> allowing for communication between <a href="http://www.openframeworks.cc/" target="_blank">openFrameworks</a> <=> <a href="http://cycling74.com/" target="_blank">max msp</a> <=> <a href="http://www.ableton.com/" target="_blank">ableton live</a>.</p>
<p><a href="http://www.flickr.com/photos/julapy/4859351651/" title="4763315908_1d2a09fcc4_o by julapy, on Flickr" target="_blank"><img src="http://farm5.static.flickr.com/4115/4859351651_6506ba2f7c.jpg" width="500" height="332" alt="4763315908_1d2a09fcc4_o" /></a></p>
<p>we had great luck with the space allocated for our installation, a disused warehouse large enough to facilitate a top-down projection. you can see the dimensions in the photo above, with eli included for scale (he is quite tall). there was also a very convenient mezzanine level where we were able to set up our control center and have a good view when testing the projection.</p>
<p><a href="http://www.flickr.com/photos/julapy/4859348171/" title="4779307403_a1850ecc63_o by julapy, on Flickr" target="_blank"><img src="http://farm5.static.flickr.com/4097/4859348171_29c38861cf.jpg" width="500" height="332" alt="4779307403_a1850ecc63_o" /></a></p>
<p>the tracking of people walking around in the space was done using openFrameworks with simple background subtraction + blob detection. the camera we used for the task was a <a href="http://www.ptgrey.com/products/fireflymv/index.asp" target="_blank">point grey firefly mv</a> with IR pass filter which did a beautiful job of capturing a crisp image with little to none noise.</p>
<p>the input from people walking around was then used to steer a flock of fireflies which flew around the space avoiding people and rocks. there was also a queen firefly which had a love / hate relationship with the rest of the colony. she followed her minions around but would scare them off if she got too close. the position of the queen in the space also controlled the direction of artificial shadows being cast by the rocks and panning of sound through the surround sound system.</p>
<p><a href="http://www.flickr.com/photos/julapy/4859970690/" title="4795830496_49ceba8840_o by julapy, on Flickr" target="_blank"><img src="http://farm5.static.flickr.com/4094/4859970690_88a54c1155.jpg" width="500" height="332" alt="4795830496_49ceba8840_o" /></a></p>
<p>the fireflies were also able to take refuge in a tree, backlit by <a href="http://en.wikipedia.org/wiki/DMX512" target="_blank">DMX</a> controlled LED lights. the tree would give off a stronger glow depending on how many fireflies were taking refuge in it at the one time.</p>
<p>in the end it was great seeing people chase the fireflies around the space and gang up to heard them into the tree. kids especially took to this activity and i think thats always a good indicator of a success interactive installation&#8230; if kids understand and enjoy it then the kid inside of us all will enjoy it too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2010/08/05/dusk-underbelly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>of_iphone_earth</title>
		<link>http://www.julapy.com/blog/2009/07/20/of_iphone_earth/</link>
		<comments>http://www.julapy.com/blog/2009/07/20/of_iphone_earth/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:06:58 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=278</guid>
		<description><![CDATA[earth application on the iphone with geodesic curves, made using openframeworks.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.julapy.com/images/iphone_earth.png" alt="" /></p>
<p>over the last week ive been playing around with openFrameworks on the iphone and getting a handle on openGL ES for a work project. its been lots of fun and suprisingly tricky to find decent resources, especially when mapping textures and geo coordinates onto a sphere. ive developed a nice basic example which i think is a good start for anyone tackling an earth application on the iphone using openFrameworks or even working with Objective C.</p>
<p>the example contains code for drawing a sphere in openGL ES and giving it an earth texture which is provided in the source. theres a Trackball class which allows you to intuitively rotate the textured sphere and a CurveHop class which draws a curved ribbon from location to location as it hops along on the surface of the earth. theres a cool little trick you can do in google maps to get the latitude and longitude of any location, so you can add it into the curve hop chain. just search for a location in google maps and copy the following code into your address bar,</p>
<p>javascript:void(prompt(&#8221;,gApplication.getMap().getCenter()));</p>
<p>this will bring up a popup with the latitude and longitude of the center of the map.</p>
<p>download the <a href="http://www.julapy.com/source/of_iphone_earth.zip">source code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2009/07/20/of_iphone_earth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>le cube</title>
		<link>http://www.julapy.com/blog/2009/03/24/le-cube/</link>
		<comments>http://www.julapy.com/blog/2009/03/24/le-cube/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 12:03:59 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=163</guid>
		<description><![CDATA[flash website built for becks using 3d interactive models and audio reactive geometry.]]></description>
			<content:encoded><![CDATA[<p><a/ href="http://becksbeer.com.au/" target="_blank"><img src="http://www.julapy.com/images/becks_05_opt.jpg" alt="beck's beer" /></a></p>
<p>my two favorite things, abstract geometry and audio reactive visuals.<br />
working on the new <a href="http://becksbeer.com.au/" target="_blank">beck&#8217;s beer site</a> was a treat with a great base design and massive scope for innovation.</p>
<p>i won&#8217;t bang on about the creation process but i will say that the cube was modeled using <a href="http://www.blender.org/" target="_blank">blender</a>, exported as a DAE file, painlessly plugged into papervision and off we went&#8230;<br />
if you are new to blender like i was i recommend reading through the <a href="http://wiki.blender.org/index.php/Doc:Manual" target="_blank">manual</a>, its the best place to start and will allow you to tinker and create as you are learning.</p>
<p>had a few days spare towards the end of the project so thought it would be nice to add an audio reactive element to the site. it is the beck&#8217;s beer brand and it is heavily associated with electronic music so i reproduced the geometry of the cube segments and added them to a 3d backdrop layer&#8230; the space junk fragments float in darkness, illuminated and pushed on by the beat of the music.</p>
<p>still trying to work out what to make open source from this project so if theres anything you&#8217;d like me to release, please let me know and ill do my best to post it on here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2009/03/24/le-cube/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>cilindrico collapse prototype</title>
		<link>http://www.julapy.com/blog/2009/02/27/cilindrico-collapse-prototype/</link>
		<comments>http://www.julapy.com/blog/2009/02/27/cilindrico-collapse-prototype/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:41:16 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[opengl]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[cilindrico collapse]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[lighting]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[reactive]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=96</guid>
		<description><![CDATA[generative design of segmented cylindrical forms]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/julapy/3315094911/" title="cilindrico_collapse_07 by julapy, on Flickr" target="_blank"><img src="http://farm4.static.flickr.com/3656/3315094911_37c7b02f28_m.jpg" width="240" height="240" alt="cilindrico_collapse_07" /></a></p>
<p>on the weekend i started working on my latest piece in processing titled cilindrico collapse. had a good run, getting everything done i had planned to do. main things were, coding the 3D motif which ive named arc bars, and after many painful attempts ive finally worked out how to use pure opengl lights inside a processing sketch. so now i can have all the pretty shapes and colours, with shading! </p>
<p>ive also inculded the ability to export the sketch to a amazingly large proportions using marius watz&#8217;s <a href="http://workshop.evolutionzone.com/2007/03/24/code-tilesaverpde/" target="_blank">tile saver class</a>. perfect if you want to print your work.</p>
<p>thought id make the <a href="http://www.julapy.com/source/CilindricoCollapse.java" target="_blank">source code</a> available now, before it gets messy with experimentation.<br />
you will also need <a href="http://code.google.com/p/toxiclibs/" target="_blank">toxiclibs</a> to get it running.<br />
enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2009/02/27/cilindrico-collapse-prototype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>dark hall</title>
		<link>http://www.julapy.com/blog/2009/02/25/dark-hall/</link>
		<comments>http://www.julapy.com/blog/2009/02/25/dark-hall/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 10:26:01 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[processing]]></category>
		<category><![CDATA[exhibition]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[stereography]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/?p=107</guid>
		<description><![CDATA[exhibition of dear samantha works @ dark hall, part of the glorious undead festival.]]></description>
			<content:encoded><![CDATA[<p><img src="http://julapy.com/images/projection_mapping_gif.gif" alt="projection mapping" /></p>
<p>had the opportunity to exhibit the latest <a href="http://www.julapy.com/blog/2009/02/13/dear-samantha/" target="_blank">dear samantha</a> work at the dark hall exhibition yesterday as part of <a href="http://thegloriousundead.com/09/" target="_blank">the glorious undead</a> festival. marcel and bronwyn did a great job transforming the kudos gallery into a forest of digital glow spotted with iridescent installations. the most impressive was a sculptural video installation by daniel kirkwood titled &#8216;<em>dc city, glistening (a seasonal cycle)</em>&#8216; using projection mapping, shown in the gif animation above. i&#8217;ve seen a lot of <a href="http://createdigitalmotion.com/index.php?s=projection+mapping" target="_blank">projection mapping</a> on the interweb but this was the first time to witness it first hand and it was a real treat.<br />
have to try it out myself very soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2009/02/25/dark-hall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>quaternion rotation</title>
		<link>http://www.julapy.com/blog/2008/12/22/quaternion-rotation/</link>
		<comments>http://www.julapy.com/blog/2008/12/22/quaternion-rotation/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 02:57:10 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[opengl]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[quaternion]]></category>
		<category><![CDATA[rotation]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/2008/12/22/quaternion-rotation/</guid>
		<description><![CDATA[quaternions have been plaguing my mind for months and their mystery has eluded me till now&#8230; finally figured the sucker out. in short, they allow for intuitive rotation around each axis. normally if you rotate around one axis and then around another, you get a combination of those two rotations and its not really where [...]]]></description>
			<content:encoded><![CDATA[<p>quaternions have been plaguing my mind for months and their mystery has eluded me till now&#8230; finally figured the sucker out.</p>
<p>in short, they allow for intuitive rotation around each axis.<br />
normally if you rotate around one axis and then around another, you get a combination of those two rotations and its not really where you want to be.<br />
quaternions allow to rotate around each axis without effecting the rotation of the other axis, so imagine a orientating a aeroplane model in a 3D flying game&#8230;<br />
an aeroplane can be rotated around each axis and these angles are referred to as roll (x-axis), pitch (y-axis) and yaw (z-axis).</p>
<p>roll is then the aeroplane direction moving up and down.<br />
pitch is the aeroplane direction moving left to right.<br />
and yaw is the aeroplane swaying from side to side.</p>
<p>so finally worked out the mathematics behind this by reverse engineering some existing arcball code.<br />
below is the processing implementation done with pure opengl, it is using some handy classes in <a href="http://code.google.com/p/toxiclibs/downloads/list">toxi&#8217;s geomutils</a>.</p>
<p>the steps are,<br />
1) work out the rotation vectors around each axis, simply by rotating the vector around an axis.<br />
2) work out the rotation quaternion for each axis, by getting the dot and cross product of each rotation vector from its origin.<br />
3) multiply the rotation quaternions of each axis. &#8211; this will give you the overall rotation quaternion.<br />
4) convert the rotation quaternion into a matrix and apply that rotation matrix.<br />
5) draw your aeroplane! done.</p>
<p>[sourcecode language='java']</p>
<p>			float DEGTORAD = PI / 180;</p>
<p>			Vec3D xrot, yrot, zrot;<br />
			Quaternion xrotQuat, yrotQuat, zrotQuat, rotQuat;<br />
			Matrix4x4 m;<br />
			float angleX, angleY, angleZ;</p>
<p>			angleX = angleDegreesX * DEGTORAD;<br />
			angleY = angleDegreesY * DEGTORAD;<br />
			angleZ = angleDegreesZ * DEGTORAD;</p>
<p>			xrot = Vec3D.Z_AXIS.copy().rotateX( angleX );<br />
			yrot = Vec3D.X_AXIS.copy().rotateY( angleY );<br />
			zrot = Vec3D.X_AXIS.copy().rotateZ( angleZ );</p>
<p>			xrotQuat = new Quaternion( 1, new Vec3D( 0, 0, 0 ) );<br />
			xrotQuat.set( xrot.dot( Vec3D.Z_AXIS.copy() ), xrot.cross( Vec3D.Z_AXIS.copy() ) );</p>
<p>			yrotQuat = new Quaternion( 1, new Vec3D( 0, 0, 0 ) );<br />
			yrotQuat.set( yrot.dot( Vec3D.X_AXIS.copy() ), yrot.cross( Vec3D.X_AXIS.copy() ) );</p>
<p>			zrotQuat = new Quaternion( 1, new Vec3D( 0, 0, 0 ) );<br />
			zrotQuat.set( zrot.dot( Vec3D.X_AXIS.copy() ), zrot.cross( Vec3D.X_AXIS.copy() ) );</p>
<p>			rotQuat = xrotQuat.multiply( yrotQuat ).multiply( zrotQuat );<br />
			m		= rotQuat.getMatrix();</p>
<p>			FloatBuffer rotMatrix;<br />
			rotMatrix = ByteBuffer.allocateDirect(4 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();<br />
			rotMatrix.put<br />
			(<br />
				new float[]<br />
				{<br />
					(float)m.matrix[0][0], (float)m.matrix[0][1], (float)m.matrix[0][2], (float)m.matrix[0][3],<br />
					(float)m.matrix[1][0], (float)m.matrix[1][1], (float)m.matrix[1][2], (float)m.matrix[1][3],<br />
					(float)m.matrix[2][0], (float)m.matrix[2][1], (float)m.matrix[2][2], (float)m.matrix[2][3],<br />
					(float)m.matrix[3][0], (float)m.matrix[3][1], (float)m.matrix[3][2], (float)m.matrix[3][3]<br />
				}<br />
			);<br />
			rotMatrix.flip();</p>
<p>			gl.glPushMatrix();</p>
<p>			gl.glTranslatef( loc.x, loc.y, loc.z );<br />
			gl.glMultMatrixf( rotMatrix );<br />
			gl.glTranslatef( -loc.x, -loc.y, -loc.z );</p>
<p>			// draw here.</p>
<p>			gl.glPopMatrix();</p>
<p>[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2008/12/22/quaternion-rotation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>bats</title>
		<link>http://www.julapy.com/blog/2008/12/13/bats/</link>
		<comments>http://www.julapy.com/blog/2008/12/13/bats/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 01:40:00 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[opengl]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[flocking]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[rotation matrix]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/2008/12/13/bats/</guid>
		<description><![CDATA[really hung over this morning after our company xmas party last night&#8230;. although strangely its making me productive and somehow able to write this post, most likely the residual of frenzy impulses from a very busy week involving the usual flash sites and a very cool interactive installation of flocking bats. the installation was for [...]]]></description>
			<content:encoded><![CDATA[<p>really hung over this morning after our company xmas party last night&#8230;. although strangely its making me productive and somehow able to write this post, most likely the residual of frenzy impulses from a very busy week involving the usual flash sites and a very cool interactive installation of flocking bats.</p>
<p>the installation was for our xmas party themed gotham so i thought id put my flocking code to some good use and apply it to some winged rodents&#8230; no, to be fair i really like bats&#8230; have masses of them flocking over my house each evening to their nightly feeding spots and always enjoy the spectacle.</p>
<p><object width="400" height="302"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2480972&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2480972&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="302"></embed></object><br /><a href="http://vimeo.com/2480972">bats_01</a> from <a href="http://vimeo.com/julapy">lukasz</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>back to code speak, getting the bats to orientate towards the direction of flight was a tricky exercise in opengl.<br />
in theory all i wanted to do was to rotate the bat around the Y axis (left or right) and around the Z axis (up or down)&#8230; easy enough, but that&#8217;s not the way it works in opengl.  if you rotate the coordinate space around one axis, then all the other axis are also rotated.<br />
with help from <a href="http://flashmonkey.servehttp.com/wordpress/?p=58">flashmonkey</a> the solution was found in using a rotation matrix and a few other vector calculations.<br />
there are probably many ways of arriving at the same result but this is what worked for us.</p>
<p>here is the <a href="http://julapy.com/source/Bat_Orientation.zip">source</a><br />
also will need <a href="http://code.google.com/p/toxiclibs/downloads/list">toxi&#8217;s geomutils library</a> if you haven&#8217;t got it already.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2008/12/13/bats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ribbon video texturing</title>
		<link>http://www.julapy.com/blog/2008/08/26/ribbons-video-texturing/</link>
		<comments>http://www.julapy.com/blog/2008/08/26/ribbons-video-texturing/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 13:48:37 +0000</pubDate>
		<dc:creator>julapy</dc:creator>
				<category><![CDATA[opengl]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[flocking]]></category>
		<category><![CDATA[ribbons]]></category>
		<category><![CDATA[video texture]]></category>

		<guid isPermaLink="false">http://www.julapy.com/blog/2008/08/26/ribbons-video-texturing/</guid>
		<description><![CDATA[over the weekend i dug up some old ribbons code with the idea of projecting video onto the ribbons as texture. the results turned out interesting although the clarity of the video got lost in the frantic flocking of the ribbons. was actually hoping for a fragmanted but yet coherent video image and this probably [...]]]></description>
			<content:encoded><![CDATA[<p>over the weekend i dug up some old ribbons code with the idea of projecting video onto the ribbons as texture. the results turned out interesting although the clarity of the video got lost in the frantic flocking of the ribbons.  was actually hoping for a fragmanted but yet coherent video image and this probably will be the direction i&#8217;ll be taking when building upon this experiment.</p>
<p>here are some of the results, the first one is using my favourite jelly video that i break out at every occasion.</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1591621&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1591621&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /><a href="http://www.vimeo.com/1591621?pg=embed&amp;sec=1591621">ribbon jelly</a> from <a href="http://www.vimeo.com/julapy?pg=embed&amp;sec=1591621">julaps</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1591621">Vimeo</a>.</p>
<p>this one was using a vj loop of space invaders, strong primary colours and you can see how it creates a completely different texture.</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1591594&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1591594&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /><a href="http://www.vimeo.com/1591594?pg=embed&amp;sec=1591594">ribbon invaders</a> from <a href="http://www.vimeo.com/julapy?pg=embed&amp;sec=1591594">julaps</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1591594">Vimeo</a>.</p>
<p>thought id also share the <a href="http://www.julapy.com/processing/RibbonsVideoSrc.zip">source</a> and really like to hear from you if you do something cool with it.  ive exported the source straight out of eclipse which is my IDE of choice for working with processing, so it might take a few minutes to copy and paste it into the processing IDE but its pretty straight forward.<br />
im also using <a href="http://toxi.co.uk/" target="blank">toxi&#8217;s</a> awesome <a href="http://code.google.com/p/toxiclibs/">geomutils library</a> which you&#8217;ll need to run the sketch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.julapy.com/blog/2008/08/26/ribbons-video-texturing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

