<?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>Oolong's Playground</title>
	<atom:link href="http://oolong.co.uk/play/feed" rel="self" type="application/rss+xml" />
	<link>http://oolong.co.uk/play</link>
	<description>adventures in generative art and fun mathematics</description>
	<lastBuildDate>Thu, 22 Mar 2012 14:17:42 +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>Toroids</title>
		<link>http://oolong.co.uk/play/toroids</link>
		<comments>http://oolong.co.uk/play/toroids#comments</comments>
		<pubDate>Thu, 01 Mar 2012 12:19:23 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=205</guid>
		<description><![CDATA[This is an animation based on  toroids, and what happens when circles of circles go in circles of circles: an image of endless four-dimensional convergence. Long, long ago, when the Internet was young and so was I, Compuserve ran a successful collection of forums on many and varied topics. Their Science &#38; Maths Forum in [...]]]></description>
			<content:encoded><![CDATA[<p>This is an animation based on  toroids, and what happens when circles of circles go in circles of circles: an image of endless four-dimensional convergence.</p>
<p><span id="more-205"></span></p>
<p>Long, long ago, when the Internet was young and so was I, Compuserve ran a successful collection of forums on many and varied topics. Their <a href="http://community.compuserve.com/n/pfx/forum.aspx?webtag=ws-sciencemath&amp;redirCnt=1">Science &amp; Maths Forum</a> in particular brought me delight and illumination; reading lucid explanations of difficult topics, and attempting to produce them myself, had a great formative influence on me as a potential scientist and educator. There&#8217;s nothing quite like explaining something to get it straight in your own head.</p>
<p>One of the internet-friends I made there was an American named Jeff Werbock, who came bearing a vision of the universe as a unified whole composed of space multiply curved in on itself, and forever converging and diverging: a sort of universal hypertoroid. Though I&#8217;m not convinced that it entirely captures the way the cosmos works, I very much like its focus on curvature and movement as fundamental features of the structure of spacetime, and I think it has great aesthetic appeal.</p>
<p>So when it struck me one day that I knew exactly how to create a visualisation of it using <a href="http://bustingseams.blogspot.com/2009/05/autodesk-animator.html">POCO</a>, the animation-based C variant that I was programming in at that time, I was pleased to sit down and make it. This was <a href="http://oolong.co.uk/tor1.htm" target="appbox">one of the first mathematical animations</a> I ever created, and the interactive version you see here is on extremely similar lines.</p>
<p>We start by drawing a toroid, which is a circle swept out in a circle, like a geometrically perfect bagel. The circles that make up the toroid are rotating, so the toroid is forever converging and diverging. Dragging the mouse left or right changes the degree to which this toroid is twisted around on itself. This gives us a rough approximation &#8211; or at least a cross-section &#8211; of a hypertoroid, which is a toroid swept out in circle.</p>
<p>Drag the mouse up and down in the frame to change the size of thing, and hold down the shift key while you do it to change the minor radius independently from the major radius.</p>
<p>I am currently working on a mobile version of this using <a href="http://wiki.processing.org/w/Android">Processing for Android</a>, and a narrative version to accompany Jeff&#8217;s in-depth explanations of how he sees this all working&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/toroids/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kenneth Web</title>
		<link>http://oolong.co.uk/play/kw</link>
		<comments>http://oolong.co.uk/play/kw#comments</comments>
		<pubDate>Thu, 09 Feb 2012 10:09:00 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=257</guid>
		<description><![CDATA[This is a set of visualisations which are all, in one way or another, based on pairs of interacting sine waves. Most of them are variations on applets I first created some time ago. The impetus to collect them all together in one place came when I set about creating an interactive installation, Kenneth and [...]]]></description>
			<content:encoded><![CDATA[<p>This is a set of visualisations which are all, in one way or another, based on pairs of interacting sine waves. </p>
<p><span id="more-257"></span>Most of them are variations on applets I first created some time ago. The impetus to collect them all together in one place came when I set about creating an interactive installation, <a href="http://oolong.co.uk/play/kenneth">Kenneth and the Waves</a>, using a more elegant set of inputs than that allowed by a mouse and keyboard.</p>
<p>The first shows the most basic interaction of two waves &#8211; the black wave at the top is the <a href="http://everything2.com/title/superposition">superposition</a> of the waves, which is to say it&#8217;s what you get when you add them together. When the two waves are in phase, the peaks of one are added to the peaks of the other; when they are in anti-phase (half a cycle out of synch with each other) they cancel out. Among other things, this is the basis of interference, and standing waves &#8211; which are what you get when two identical waves travel in opposite directions in the same space. Standing waves don&#8217;t travel at all, even though they are made up of waves travelling in opposite directions. All musical instruments make use of standing waves, and they are important for various other reasons.</p>
<p>Since all the animations are all based on pairs of simple waves, they can all be controlled by changing the frequency, amplitude and speed of those waves. To do this, drag the mouse cursor in the animation box to change frequency (left button), amplitude (right button or shift-click) and speed (middle button or ctrl-click). The vertical axis controls one wave, horizontal axis controls the other. Press a key to switch between animations.</p>
<p>If you don&#8217;t have a working Java plugin for your browser, or you just want a bigger version, you could try downloading one of these applications for your operating system:</p>
<ul>
<li><a href="http://oolong.co.uk/kw/application.linux32.rar">Linux (32-bit)</a></li>
<li><a href="http://oolong.co.uk/kw/application.linux64.rar">Linux (64-bit)</a></li>
<li><a href="http://oolong.co.uk/kw/application.macosx.rar">Mac OS X</a></li>
<li><a href="http://oolong.co.uk/kw/application.windows32.rar">Windows (32-bit)</a></li>
<li><a href="http://oolong.co.uk/kw/application.windows64.rar">Windows (64-bit)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/kw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fretboard</title>
		<link>http://oolong.co.uk/play/fretboard</link>
		<comments>http://oolong.co.uk/play/fretboard#comments</comments>
		<pubDate>Thu, 15 Dec 2011 23:37:03 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=246</guid>
		<description><![CDATA[This is an interactive diagram of a guitar fretboard. It shows you all the different ways that chords can be made, in different tunings. It&#8217;s inspired by Robert Johnston&#8217;s Hello Guitar Method of teaching, but doesn&#8217;t necessarily do it justice. You might also be interested in relating this to the &#8216;CAGED guitar system&#8217;. The diagram [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/Fretboard" target="appBox">This</a> is an interactive diagram of a guitar fretboard. It shows you all the different ways that chords can be made, in different tunings.</p>
<p><span id="more-246"></span>It&#8217;s inspired by Robert Johnston&#8217;s <a href="http://www.helloguitarmethod.com/">Hello Guitar Method</a> of teaching, but doesn&#8217;t necessarily do it justice. You might also be interested in relating this to the <a href="http://www.cagedguitarsystem.net/">&#8216;CAGED guitar system&#8217;</a>.</p>
<p>The diagram shows a guitar (or violin or ukulele) with the head on the left. The root note of any chord is shown in white wherever it appears on the fretboard, and the other notes that appear in any chord are highlighted with colours depending on their relation to the root. A chord is made up of three or more different notes, each of which might be played  on one or more string, so that there is always a range of different ways of playing any chord on a stringed instrument. Usually the root note is the deepest string played, but not always.</p>
<p>Use the drop-down menus to choose your chord, or else click on the applet to give it focus and then use the keyboard to select chords:</p>
<ul>
<li>a-g choose the root note of the chord.</li>
<li>A-G are sharp chords, so press shift and a to get A#</li>
<li>The number keys select the type of chord.
<ol>
<li>is your basic major chord, like C. This consists of the first, third and fifth notes of the major scale: C E G</li>
<li>is a sus2 chord, like Csus2. This has the first, <em>second</em> and fifth notes: C D G.</li>
<li>is a minor chord, like Cm. This uses the first, third and fifth notes of the <em>minor</em> scale: C D# G</li>
<li>is a sus4 chord, like Csus4. This has the first, <em>fourth</em> and fifth notes of the major scale: C F G. These are also the major chords in the key you&#8217;re looking at. Notice that if you go from Csus2 to Cm to C to Csus4, the first and fifth notes are static while the middle note increases by one semitone between each.</li>
<li>is a &#8216;power chord&#8217;, like C5. This <em>loses</em> the middle note entirely, being made only of firsts and fifths: C G. Usually played with only three strings.</li>
<li>is a &#8217;6&#8242; chord, like C6 (which is also Am7). The first, third, fifth <em>and sixth</em> notes of the major scale: C E G A</li>
<li>is a seventh chord, like C7. The first, third, fifth notes of the major scale, plus the <em>seventh note of the minor scale</em>: C E G A#</li>
<li>is a <em>major</em> seventh chord, like C7maj. This uses the first, third, fifth <em>and seventh</em> notes of the major scale, giving a noticeably more dissonant chord than C7: C E G B</li>
<li>is an &#8216;add 9&#8242; chord, like Cadd9. That&#8217;s the first, <em>second</em>, third and fifth notes of the major scale (or, by convention, first, third, fifth <em>and ninth</em>): C D E G</li>
</ol>
</li>
<li>The space bar switches between different tunings.</li>
</ul>
<p>I&#8217;ll be writing a version of this for Android smart phones, and also adding a few more chord types and integrating the menus into the applet itself &#8211; at the moment, because they&#8217;re part of the web site rather than the applet, they don&#8217;t change when you use the keyboard to change the applet&#8217;s settings.</p>
<p>Source code: <a href="/Fretboard/Fretboard2.pde">Fretboard</a></p>
<p>Built with <a title="Processing.org" href="http://processing.org/">Processing</a></p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/fretboard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kenneth Mark II</title>
		<link>http://oolong.co.uk/play/kenneth-mark-ii</link>
		<comments>http://oolong.co.uk/play/kenneth-mark-ii#comments</comments>
		<pubDate>Sat, 03 Dec 2011 14:20:56 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=224</guid>
		<description><![CDATA[This summer I went travelling around the Iberian Peninsula, partly because I had some of my work accepted for the exhibition accompanying the 2011 Bridges Conference on connections between art and mathematics, in Portugal &#8211; specifically, a large print of my generative art still &#8216;Vortical&#8216; and my interactive installation based on waves, Kenneth. Since I [...]]]></description>
			<content:encoded><![CDATA[<p>This summer I went <a href="http://oolong.co.uk/oo/travel-in-iberia">travelling around the Iberian Peninsula</a>, partly because I had some of my work accepted for the <a href="http://gallery.bridgesmathart.org/exhibitions/2011-bridges-conference">exhibition</a> accompanying the <a href="http://bridgesmathart.org/bridges-2011/">2011 Bridges Conference</a> on connections between art and mathematics, in Portugal &#8211; specifically, <a href="http://www.flickr.com/photos/0olong/6002507512/in/photostream/">a large print</a> of my generative art still &#8216;<a href="http://www.flickr.com/photos/0olong/2830078511/">Vortical</a>&#8216; and my interactive installation based on waves, <a href="http://oolong.co.uk/play/kenneth">Kenneth</a>.</p>
<p>Since I planned to travel all over Spain and Portugal carrying this thing, I figured I&#8217;d better make something more portable than the beautiful <a href="http://www.flickr.com/photos/0olong/3902037202/">fire-engine-red box</a> that Tom Hardiment made me for Kenneth Mark I, which was originally a solid hardwood drawer. I took the opportunity to give it a completely different aesthetic.</p>
<p>I was always torn between two looks for controls for my animations &#8211; either they should be hyper-futuristic, like a starship control panel, or stained wood and brass like the machines and instruments of the Victorian era. I have always had a thing for antique scientific equipment, so I can understand why steampunk has become such a big thing. I decided to go with wood and brass.</p>
<p><a title="Kenneth Mark II knob macro by 0olong, on Flickr" href="http://www.flickr.com/photos/0olong/6002509540/"><img src="http://farm7.staticflickr.com/6007/6002509540_cf5ecefd87_m.jpg" alt="Kenneth Mark II knob macro" width="240" height="160" /></a></p>
<p><span id="more-224"></span>I stripped out the plywood with the sliders and buttons attached, cut it down to size, sanded it, stained it and varnished it, and I picked up some brass knobs  and edging. Then I travelled with it to the Basque Country, where I was teaching English and looking after kids on a summer camp for a couple of weeks.  One of my colleagues there, Gareth Fox, helped me put it all together with some support struts; I replaced the plastic slider knobs with the sort you might otherwise use to open small doors. Then I went travelling again, right across to the southwest of Spain and then back up through Portugal.</p>
<p>Unfortunately somewhere on that largely unplanned journey (it&#8217;s a long story) I  misplaced the Arduino board that provides the interface between the sliders and a computer&#8217;s USB port. It&#8217;s not always easy to find an Arduino in a small city in a foreign country, and with no local knowledge at my command I googled &#8216;Arduino Coimbra&#8217; and reached out for advice to the one person I found listed on the Arduino site, <a href="http://paloma.isr.uc.pt/~micaelcouceiro/about_me/about_me.htm">Micael Couceiro</a> of <a href="http://www.robocorp.org/">RoboCorp</a> and <a title="Instituto Superior de Engenharia de Coimbra" href="http://www.isec.pt/">ISEC</a>.  He suggested that if I didn&#8217;t have time to order online and wait for a delivery, I should try a shop on the outskirts of town, so I went there at lunch the next afternoon and sat around for about two hours waiting for them to open, only to find they were all out.</p>
<p>Eventually he very kindly agreed to lend me a board from his department, so I went over there the next day and in the end he didn&#8217;t just lend me a board but he and his colleagues offered an amazing amount of support and practical help mounting it properly and putting finishing touches to the box.</p>
<p>I finally got to exhibit Kenneth Mark II properly on the very last day of the conference &#8211; a little late, but not too late for a whole lot of people to play with it and give very positive feedback!</p>
<p><a title="Kenneth Fingers by 0olong, on Flickr" href="http://www.flickr.com/photos/0olong/6002508162/"><img src="http://farm7.staticflickr.com/6134/6002508162_81cb3076d8_m.jpg" alt="Kenneth Fingers" width="215" height="240" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/kenneth-mark-ii/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kenneth and the Waves</title>
		<link>http://oolong.co.uk/play/kenneth</link>
		<comments>http://oolong.co.uk/play/kenneth#comments</comments>
		<pubDate>Tue, 12 Oct 2010 17:38:51 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=187</guid>
		<description><![CDATA[Everything we see and hear is made of waves, and the interactions of different frequencies &#8211; interference, resonance and harmony &#8211; account for many of the most interesting things there are. They are also a lot of fun to visualise, so I have put together a collection of animations &#8211; applets &#8211; which are all [...]]]></description>
			<content:encoded><![CDATA[<p>Everything we see and hear is made of waves, and the interactions of different frequencies &#8211; interference, resonance and harmony &#8211; account for many of the most interesting things there are. They are also a lot of fun to visualise, so I have put together a collection of animations &#8211; applets &#8211; which are all different visualisations of the interactions of waves, or their close cousins the circles. These are designed for display in public places, with a control box for people to experiment with and supporting literature.<br />
<span id="more-187"></span><br />
The applets have a unified set of controls, with each one giving the controller three pairs of sliders. The first pair control the amplitude of each of a pair of waves or circles; the second two their frequencies; the last two their speeds. As with waves in the real world, the interactions in each animation are fundamentally very similar, but they look so different that the relations between them may not be immediately obvious.</p>
<p><a title="The Box by Daylight by 0olong, on Flickr" href="http://www.flickr.com/photos/0olong/3902037202/"><img style="float: right;" src="http://farm3.static.flickr.com/2431/3902037202_9993ba28d3_t.jpg" alt="The Box by Daylight" width="100" height="67" /></a>The real-life version of &#8216;Kenneth and the Waves&#8217; features a big red control box with physical sliders and buttons to play with, and the animations projected on a nearby surface. The online version will follow later.</p>
<p>The Institute of Physics has provided funding for this project to promote public engagement with the science of waves, though the installation is fun however little you care about such things.</p>
<h3>What&#8217;s the frequency (and what are amplitude and wave speed)?</h3>
<p>The frequency of a wave is how many cycles it goes through in a second &#8211; so the musical note of middle C, which has a frequency of 256Hz, goes through 256 cycles every second: A string bounces back and forth 256 times, or a body of air expands and contracts 256 times, and so on.</p>
<p>The amplitude of a wave can be thought of as its maximum height, though it is only literally a height in the case of surface waves like ocean waves and some earthquake waves. It measures the difference between the extremes of a wave&#8217;s motion and its resting position.</p>
<p>The speed of a wave, as you might expect, is how fast it passes through its medium &#8211; for example, sound travels through air at around 340 metres per second, and light travels almost a million times faster.</p>
<p>The wavelength of a wave is the distance between one peak and the next. It&#8217;s proportional to the speed of the wave, and inversely proportional to its frequency.</p>
<h3>The applets</h3>
<p>The applets included are variants on <a href="http://oolong.co.uk/trochframe.htm" target="appBox">Trochor</a>, <a href="http://oolong.co.uk/yinyo" target="appBox">Yinyo</a>, <a href="http://oolong.co.uk/shimmia" target="appBox">Shimmia</a>, <a href="http://oolong.co.uk/zoobie" target="appBox">Zoobie</a> and a new one on similar lines to <a href="http://oolong.co.uk/resonata.htm" target="_new">Resonata</a> but with two connected chains. A laminated poster will explain the controls and what they tell us about waves.</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/kenneth/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>It&#8217;s about control</title>
		<link>http://oolong.co.uk/play/its-about-control</link>
		<comments>http://oolong.co.uk/play/its-about-control#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:58:32 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=119</guid>
		<description><![CDATA[Interactive animations need intuitive controls to make them easy to play with. Since they always have a bunch of parameters to control, dragging with the mouse always seems a bit clumsy. I figured that what&#8217;s really wanted is a bank of sliders and buttons to play with, each controlling a parameter. That way people can [...]]]></description>
			<content:encoded><![CDATA[<p>Interactive animations need intuitive controls to make them easy to play with. Since they always have a bunch of parameters to control, dragging with the mouse always seems a bit clumsy.</p>
<p><a title="Slider array by 0olong, on Flickr" href="http://www.flickr.com/photos/0olong/3902037196/"><img class="alignleft" src="http://farm3.static.flickr.com/2656/3902037196_00779e9781_t.jpg" alt="Slider array" /></a>I figured that what&#8217;s really wanted is a bank of sliders  and buttons to play with, each controlling a parameter. That way people can walk up to the controls as if they were approaching the bridge of a starship, and just twiddle them however they feel.<br />
<a title="The Box by Daylight" href="http://www.flickr.com/photos/0olong/3902037202/"><img style="float: right;" title="The Control Box in all its glory" src="http://farm3.static.flickr.com/2431/3902037202_9993ba28d3_t.jpg" alt="The Box by Daylight" width="100" height="67" /></a></p>
<p>Now, with the help of the <a href="http://dorkbot.noodlefactory.co.uk/wiki/DorkbotAlba">Dorkbot Alba</a> team, I finally have the controls I&#8217;ve long dreamed of, in the shape of a box with six sliders, five buttons and two glowing switches. It is a thing of beauty.</p>
<p><a title="PLAY by 0olong, on Flickr" href="http://www.flickr.com/photos/0olong/3901296889/"><img class="alignleft" title="PLAY" src="http://farm3.static.flickr.com/2540/3901296889_d565a54175_t.jpg" alt="PLAY" width="100" height="75" /></a>The obvious next step once you have a good interface for a set of generative animations is to start putting them in public places for people to experiment with, I think.<span id="more-119"></span></p>
<p><a href="http://www.flickr.com/photos/0olong/3901444861/"><img class="alignright" src="http://farm3.static.flickr.com/2435/3901444861_18da173928_t.jpg" alt="" width="67" height="100" /></a>The first such place was the <a href="http://www.theforest.org.uk/category/event-location/hall-upstairs">Forest Hall</a> in Edinburgh, at a night called Dubversion, along with a collection of electrical strangeness from Dorkbot including the &#8216;<a href="http://dorkbot.noodlefactory.co.uk/wiki/WaldFlÃ¶te">WaldflÃ¶te</a>&#8216; MIDI-rigged pipe organ, a Jacob&#8217;s Ladder and the amazing Quadracopter &#8211; as well as some excellent music.</p>
<p>I&#8217;m seeing this as an installation at a science museum, in the classroom or an art gallery. There&#8217;s lots more still to do with it.</p>
<p>I decided to make sure the sliders control much the same things in different animations &#8211; though they each look very different, they are all built out of <a href="http://oolong.co.uk/trig.htm">trigonometric functions</a>, so we can think of them as the product of waves. The most basic properties of a wave are its amplitude (loudness, if we&#8217;re talking about sound); its frequency (the pitch of a sound) and the speed at which it travels. Though they do very different things with them, each of the animations I&#8217;ve rigged up with this can be seen in terms of the two sets of interacting waves, so we have a pair of sliders controlling their amplitudes, a pair for frequency and a pair for wave speed.</p>
<p>As I&#8217;ve written elsewhere, <a href="http://oolong.co.uk/resonata.htm">waves are absolutely fundamental</a> to an enormous range of physical processes, as well as being great fun to animate. The universe is pretty much made out of waves, so wave speed,  frequency and amplitude are three of the most basic and far-reaching concepts in physics.</p>
<p>Applets adapted to work with the control panel:</p>
<ul>
<li><a href="http://oolong.co.uk/shimmia" target="appBox">Shimmia</a> (with added webcam input)</li>
<li><a href="http://oolong.co.uk/zoobie" target="appBox">Zoobie</a></li>
<li><a href="http://oolong.co.uk/rosaly" target="appBox">Rosaly</a></li>
<li><a href="http://oolong.co.uk/yinyo" target="appBox">Yinyo</a></li>
<li>(also <a href="http://oolong.co.uk/trochor.htm" target="appBox">Trochor</a>, finally re-done in Processing &#8211; more on that later &#8211; and <a href="http://oolong.co.uk/dragoria" target="appBox">Dragoria</a>, but that doesn&#8217;t work with compatible controls&#8230;)</li>
</ul>
<p>Credits:</p>
<ul>
<li>Tom Hardiment built the slider-box.</li>
<li>Martin Ling and Al Bennett helped out with the wiring and setting up the Arduino unit.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/its-about-control/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trochor &#8211; Animated Virtual Harmonograph</title>
		<link>http://oolong.co.uk/play/trochor</link>
		<comments>http://oolong.co.uk/play/trochor#comments</comments>
		<pubDate>Tue, 23 Jun 2009 13:32:11 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=104</guid>
		<description><![CDATA[The pattern traced out by Trochor is what you&#8217;d get if you took a pencil moving in ellipses, and used it to draw on a sheet of paper that&#8217;s also moving in ellipses. It&#8217;s a bit like a spirograph, but not constrained in quite the same ways. It&#8217;s more like a harmonograph; more on that [...]]]></description>
			<content:encoded><![CDATA[<p>The pattern traced out by <a href="/trochframe.htm" target="appBox">Trochor</a> is what you&#8217;d get if you took a pencil moving in ellipses, and used it to draw on a sheet of paper that&#8217;s also moving in ellipses. It&#8217;s a bit like a <a href="http://mathworld.wolfram.com/Spirograph.html">spirograph</a>, but not constrained in quite the same ways. It&#8217;s more like a harmonograph; more on that later.</p>
<p>Have fun, play around with the settings, especially &#8216;ratio&#8217;; that&#8217;s probably the best way of figuring out what&#8217;s going on. &#8216;Eccentricity&#8217;, by the way, is a measure of how flattened an ellipse is &#8211; an ellipse with 0 eccentricity is a circle, one with 1 is a line.<br />
<span id="more-104"></span></p>
<h3>The Long Version</h3>
<p>I first stumbled on trochoids by playing around with plotting <a href="/trig.htm">trigonometric</a> functions.</p>
<p>I wondered what would happen if you took the basic parametric equations for plotting a circle -</p>
<p><em>x</em> = <em>radius </em>* cos (Î¸)<br />
<em>y </em>= <em>radius</em> * sin (Î¸)</p>
<p>- and added them to the equation for another circle, turning more than one circle in the time it takes to draw the first one, so we get something like the trails left by a point on a wheel rolling around another wheel (an <a href="http://mathworld.wolfram.com/Epitrochoid.html">epitrochoid</a> or <a href="http://mathworld.wolfram.com/Hypotrochoid.html">hypotrochoid</a>), with these equations:</p>
<p><em>x</em> = <em>radius<sub>1</sub></em> * cos (Î¸)<br />
+ <em>radius<sub>2</sub> </em>* cos (<em>ratio</em> * Î¸)</p>
<p><em>y </em>= <em>radius<sub>1</sub></em> * sin (Î¸)<br />
+ <em>radius<sub>2</sub></em> * sin (<em>ratio</em> * Î¸)</p>
<p>This makes some pleasing shapes, so I thought I would try animating it.</p>
<p>The most obvious thing to do is to change the relative phase of the first and second circles, but this just turns the whole thing round.</p>
<p>What&#8217;s more interesting is to animate the phase of the x component (the cosine) in the opposite direction to the y component (sine):</p>
<p><em>x</em> = <em>radius<sub>1</sub></em> * cos (Î¸) + <em>radius<sub>2</sub> </em>* cos (<em>ratio</em> * Î¸ + f)</p>
<p><em>y </em>= <em>radius<sub>1</sub></em> * sin (Î¸) + <em>radius<sub>2</sub></em> * sin (<em>ratio</em> * Î¸ &#8211;  f)</p>
<p>This makes the circle shrink to a line, then grow into a circle flowing the opposite way, and then go through the same cycle again.</p>
<p>Combined with the first circle, this makes the sort of animations you can see above.</p>
<p>Pleased with the results of this, in 2001 I made an applet to let people play with it, and that&#8217;s where things stood till September 2004.</p>
<p>Then I read a gorgeously produced wee book called <cite><a href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=uF7F5NAARh&amp;isbn=0802714099&amp;itm=1">Harmonograph: A Visual Guide to the Mathematics of Music</a></cite>.</p>
<p><cite>Harmonograph</cite> provides an impressively clear and thorough introduction to the basics of music theory, and ways of visualising music.</p>
<p>It does this in 50-odd pages, replete with beautiful illustrations of harmony made by <a href="http://mathworld.wolfram.com/Harmonograph.html">harmonographs</a>, <a href="http://www.lumen.nu/rekveld/texts/symhar.html">kaleidophones</a>, <a href="http://www.phys.unsw.edu.au/%7Ejw/patterns3.html">Chladni plates</a> and the like.</p>
<p>A harmonograph is an instrument invented in the mid-nineteenth century, using two or more pendulums to produce beautiful pictures. The pictures are especially beautiful when the ratios of the frequencies of the pendulums are close to whole numbers, just as chords are especially beautiful when the ratios of the frequencies notes making them up are close to whole numbers.</p>
<p>The pictures I was making with Trochor were almost the same pictures produced by a rotary harmonograph, except that the pendulums of a harmonograph steadily wind down as they draw, and Trochor was arbitrarily restricted to whole-number ratios between the two drivers.</p>
<p>A kaleidophone, like a harmonograph, creates images of harmonics, but these  are made only fleetingly, in light. It consists of a metal rod fixed in a stand, with a reflective bead on top, which is struck and then stroked with a bow.</p>
<p>A beam of light reflected from the top of it casts patterns onto a screen,  rather like those of a rotary harmonograph, but more complex.</p>
<p>The biggest difference, judging by the illustrations I have seen, is that it is not restricted to circular motion:</p>
<p>Free to vibrate in any direction, it produces patterns composed of interacting linear waves and ellipses.</p>
<p>I have incorporated the idea of using ellipses, together with the damped spiralling motion and non-integer ratios of the harmonograph, into Trochor.</p>
<p>With 0 eccentricity, we are back to the rotary harmonograph; with 1, we have the linear harmonograph, producing <a href="http://mathworld.wolfram.com/LissajousCurve.html">Lissajous</a>-type figures.</p>
<p>The equations of this version are as follow:</p>
<p><em> x</em> = <em>(1-damping)<sup>n</sup> * (axis<sub>1a</sub></em> * cos<br />
(Î¸) + <em>axis<sub>2a</sub></em> * cos (<em>ratio</em> * Î¸ + f))</p>
<p><em>y </em>=<em>(1-damping)<sup>n</sup></em> * (<em>axis<sub>1b</sub></em> * sin (Î¸) + <em>axis<sub>1b</sub></em> * sin (<em>ratio</em> * Î¸ &#8211; f))</p>
<p><a href="/Trochor.java">The code for this applet</a> is available for anyone curious &#8211; but bear in mind I wrote most of this around eight years ago, and the rest three years or so after that, and it&#8217;s not necessarily the best code! I should probably re-do this in Processing really.</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/trochor/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>An Introduction to Programming,  Using Processing. Part 1: Why Program?</title>
		<link>http://oolong.co.uk/play/whyprogram</link>
		<comments>http://oolong.co.uk/play/whyprogram#comments</comments>
		<pubDate>Sun, 24 May 2009 13:19:49 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=74</guid>
		<description><![CDATA[Processing is a language created by Ben Fry and Casey Reas of MIT, designed to make computer programming accessible to people who might imagine it will always be beyond their grasp. Processing makes it easy to create beautiful, interactive graphics. The principles of computer programming are surprisingly simple and powerful. They also provide an easy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://processing.org/">Processing</a> is a language created by Ben Fry and Casey Reas of MIT, designed to make computer programming accessible to people who might imagine it will always be beyond their grasp. Processing makes it easy to create beautiful, interactive graphics.</p>
<p>The principles of computer programming are surprisingly simple and powerful. They also provide an easy way in to understanding some very important concepts in mathematics and science, by making them into things you can play around with. Messing about with stuff is one of the ways that humans learn best, as well as being hugely enjoyable!<br />
<span id="more-74"></span><br />
For scientists and engineers, it is crucial to be able to solve equations, to apply the methods of mathematics to practical or theoretical problems. For the rest of us, that might be less important but there is still great value in having an intuitive understanding of the way the world works. Often, this is much easier if we have a handle on the mathematics expressing scientific laws.</p>
<p>This is only one of the reasons almost everyone should be exposed to the fundamentals of programming. Another reason is that there is huge practical value in even quite simple programming. Most web sites, for example, are built using one or more scripting languages. In general this makes them far easier to maintain, but since many people imagine that programming at all is beyond them, they get put off trying to make fundamental changes.</p>
<p>The biggest reason for everyone to have a go at programming is also the simplest: Programming can be tremendous fun, and you&#8217;ll never know how much until you try it. It&#8217;s a toy, a tool, and a tool for making toys.</p>
<p>To give you an idea of how easy it is to get started with Processing, and a taste of what beautiful and seemingly complex forms can arise from a tiny amount of mathematics, I have included below a very short program to draw a fractal &#8211; a mathematical form which shows similar structures at many different scales, in this case spirals of spirals of spirals. The comments within the program should give you some clues what is going on, but do not worry if you are not able to follow all of the steps in it, especially if you have never programmed before. Soon, it will all make perfect sense!</p>
<p>I would encourage you to download Processing from <a href="http://processing.org">http://processing.org</a> now and install it following the simple instructions there. Then paste in the code below and hit &#8216;run&#8217;.</p>
<pre class="qoate-code">
// Double slashes indicate this line is a comment that Processing can ignore.
// Comments in your code make it easier to follow.
// The first thing to do is declare all the variables we will use.
float x, y, seed=420, f; // Each seed value gives a different fractal.
double df=0, ddf=TWO_PI/seed;
int i=0;
void setup(){ // 'setup' is called just once, when the program is run.
  size(200,200); // Tell Processing how big a window it should use.
}
void draw(){ // 'draw' is called every time the program draws a frame.
  // We need to reset most of the variables every frame.
  x=100;
  y=100;
  i=0;
  f=0;
  df=0;
  background(255); // This fills in the frame with a white background.
  while (i&lt;9000){ // Repeat the next block 9000 times.
    i+=1;
    f+=df;
    df+=ddf;
    x+=cos(f);
    y+=sin(f);
    point(x,y);
  }
  ddf+=0.00000005; // So ddf changes every frame, causing animation to happen.
}
</pre>
<p>Feel free to play around with this code, setting the variable named &#8216;seed&#8217; to different numbers, changing the size of the window and so on. You might also like to start looking at some of the examples that come with Processing. Next time we will start looking in more detail in what&#8217;s going on here.</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/whyprogram/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing</title>
		<link>http://oolong.co.uk/play/processing</link>
		<comments>http://oolong.co.uk/play/processing#comments</comments>
		<pubDate>Wed, 17 Dec 2008 18:37:11 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=67</guid>
		<description><![CDATA[For those who might be interested in where all these pretty pictures and animations come from, I have recently written a piece about Processing, the open-source programming language that most of them are made in. Processing is designed to be easy to learn and quick for knocking up simple programs which explore particular graphical and [...]]]></description>
			<content:encoded><![CDATA[<p>For those who might be interested in where all these pretty pictures and animations come from, I have recently written <a href="http://everything2.com/node/1965735">a piece about Processing</a>, the open-source programming language that most of them are made in.</p>
<p><a href="http://processing.org/">Processing</a> is designed to be easy to learn and quick for knocking up  simple programs which explore particular graphical and mathematical ideas. It is one of my favourite things ever, and I would encourage anybody to have a play around with it some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/processing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shimmia</title>
		<link>http://oolong.co.uk/play/shimmia</link>
		<comments>http://oolong.co.uk/play/shimmia#comments</comments>
		<pubDate>Thu, 27 Nov 2008 15:13:55 +0000</pubDate>
		<dc:creator>frm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oolong.co.uk/play/?p=50</guid>
		<description><![CDATA[Algorithmically distorting images is fun! Shimmia re-uses most of the maths and the code from Zoobie &#8211; both programs run through a grid of points, and for each one they pick a second point, displaced from the first by the interactions of waves. Zoobie then draws a semi-transparent triangle at the second point, whereas Shimmia [...]]]></description>
			<content:encoded><![CDATA[<p>Algorithmically distorting images  is fun! <a href="/shimmia" target="appBox">Shimmia</a> re-uses most of the maths and the code from <a href="/zoobie" target="appBox">Zoobie</a> &#8211; both programs run through a grid of points, and for each one they pick a second point, displaced from the first by the interactions of waves.</p>
<p>Zoobie then draws a semi-transparent triangle at the second point, whereas Shimmia draws a pixel at the first point which gets its colour from second point in an image. The relation between them is quite a lot like the one between <a href="http://flickr.com/groups/caustics/">caustics</a> and <a href="http://flickr.com/groups/refract/">refracted images</a>, though the mathematical analogy is not exact.</p>
<p>Click and drag inside the applet with either mouse button (or, if you only have one, with and with the closest thing you have to a Ctrl button) to change the frequency and amplitude of the waves. Drag with shift held down to change their speed.</p>
<p>For now the image is just <a href="http://bighugelabs.com/flickr/onblack.php?id=3009950293&#038;size=large">this one I took of some leaves</a>, but I figure I&#8217;ll see if I can pull pictures from Flickr later.</p>
]]></content:encoded>
			<wfw:commentRss>http://oolong.co.uk/play/shimmia/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

