<?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>labs.hellokeita.com &#187; Graphics</title>
	<atom:link href="http://labs.hellokeita.com/category/graphics/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.hellokeita.com</link>
	<description>Yet another labs blog</description>
	<lastBuildDate>Thu, 01 Dec 2011 20:14:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Editing BitmapData from different domain</title>
		<link>http://labs.hellokeita.com/2011/12/02/editing-bitmapdata-from-different-domain/</link>
		<comments>http://labs.hellokeita.com/2011/12/02/editing-bitmapdata-from-different-domain/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 20:12:26 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=129</guid>
		<description><![CDATA[Wonder how to apply smoothing, read and write pixels on a image loaded from a different domain name?
Quite simple, load as binary first and than load the ByteArray as Bitmap.

var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.addEventListener(Event.COMPLETE, urlLoaderComplete);
var url:String = "http://www.adobe.com/images/shared/product_mnemonics/50x50/flash_player_50x50.gif";
urlLoader.load(new URLRequest(url));
function urlLoaderComplete(e:Event):void
{
&#160;&#160;var loader:Loader = new Loader();
&#160;&#160;loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
&#160;&#160;loader.loadBytes(urlLoader.data as ByteArray);
}

function loaderComplete(e:Event):void
{
&#160;&#160;var bmp:Bitmap = e.currentTarget.content as Bitmap;
&#160;&#160;addChild(bmp);
&#160;&#160;var [...]]]></description>
			<content:encoded><![CDATA[<p>Wonder how to apply smoothing, read and write pixels on a image loaded from a different domain name?</p>
<p>Quite simple, load as binary first and than load the ByteArray as Bitmap.</p>
<p><code><br />
var urlLoader:URLLoader = new URLLoader();<br />
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;<br />
urlLoader.addEventListener(Event.COMPLETE, urlLoaderComplete);</code></p>
<p><code>var url:String = "http://www.adobe.com/images/shared/product_mnemonics/50x50/flash_player_50x50.gif";<br />
urlLoader.load(new URLRequest(url));</code></p>
<p><code>function urlLoaderComplete(e:Event):void<br />
{<br />
&nbsp;&nbsp;var loader:Loader = new Loader();<br />
&nbsp;&nbsp;loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);<br />
&nbsp;&nbsp;loader.loadBytes(urlLoader.data as ByteArray);<br />
}</p>
<p></code></p>
<p><code>function loaderComplete(e:Event):void<br />
{<br />
&nbsp;&nbsp;var bmp:Bitmap = e.currentTarget.content as Bitmap;<br />
&nbsp;&nbsp;addChild(bmp);<br />
&nbsp;&nbsp;var bitmapData:BitmapData = bmp.bitmapData<br />
&nbsp;&nbsp;bitmapData.applyFilter(bitmapData, bitmapData.rect, new Point(0, 0),<br />
&nbsp;&nbsp;&nbsp;&nbsp;new ColorMatrixFilter([<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, 0, 0, 0, 0,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1, 1, 0, 0, 0,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, 0, 1, 0, 0,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, -1, -1, 1, 0<br />
&nbsp;&nbsp;]));<br />
}<br />
</code></p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2011/12/02/editing-bitmapdata-from-different-domain/&ztz=Editing BitmapData from different domain'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2011/12/02/editing-bitmapdata-from-different-domain/&ztz=Editing BitmapData from different domain'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2011/12/02/editing-bitmapdata-from-different-domain/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fast Metaball Effect in AS3</title>
		<link>http://labs.hellokeita.com/2010/08/02/fast-metaball-effect-in-as3/</link>
		<comments>http://labs.hellokeita.com/2010/08/02/fast-metaball-effect-in-as3/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 11:20:27 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[fast]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[metaball]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=121</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_metaball_1989352133"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/metaball/metaball.swf" />
	<param name="bgcolor" value="#000000" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/metaball/metaball.swf"
			name="fm_metaball_1989352133"
			width="400"
			height="300">
		<param name="bgcolor" value="#000000" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>

var container:Sprite = new Sprite();
var balls:Vector. = new Vector.();
var m:Matrix;
var s:Shape;
var r:Number;
var c:uint;
for(var i:int = 0; i < 10; i++){
	r = Math.random() * 100 + 100;
	m = new Matrix();
	m.createGradientBox(r, r, 0, -r * 0.5, -r * 0.5);
	s = container.addChild(new Shape()) as Shape;
	c = Math.random() * 0xFFFFFF;
	s.graphics.beginGradientFill(GradientType.RADIAL, [c, c], [...]]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_metaball_879087301"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/metaball/metaball.swf" />
	<param name="bgcolor" value="#000000" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/metaball/metaball.swf"
			name="fm_metaball_879087301"
			width="400"
			height="300">
		<param name="bgcolor" value="#000000" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><code><br />
var container:Sprite = new Sprite();<br />
var balls:Vector.<Shape> = new Vector.<Shape>();<br />
var m:Matrix;<br />
var s:Shape;<br />
var r:Number;<br />
var c:uint;<br />
for(var i:int = 0; i < 10; i++){<br />
	r = Math.random() * 100 + 100;<br />
	m = new Matrix();<br />
	m.createGradientBox(r, r, 0, -r * 0.5, -r * 0.5);<br />
	s = container.addChild(new Shape()) as Shape;<br />
	c = Math.random() * 0xFFFFFF;<br />
	s.graphics.beginGradientFill(GradientType.RADIAL, [c, c], [1, 0], [0x00, 0xFF], m);<br />
	s.graphics.drawRect(-r * 0.5, -r * 0.5, r, r);<br />
	s.x = Math.random() * 400;<br />
	s.y = Math.random() * 300;<br />
	moveBall(s);<br />
	balls.push(s);<br />
}<br />
function moveBall(s:Shape):void<br />
{<br />
//whatever easing to move the spheres<br />
}<br />
var s2:Shape = container.addChild(new Shape()) as Shape;<br />
m = new Matrix();<br />
m.createGradientBox(200, 200, 0, -100, -100);<br />
c = Math.random() * 0xFFFFFF;<br />
s2.graphics.beginGradientFill(GradientType.RADIAL, [c, c], [1, 0], [0x00, 0xFF], m);<br />
s2.graphics.drawRect(-100, -100, 200, 200);<br />
var bmpData:BitmapData = new BitmapData(400, 300, true, 0x00000000);<br />
var bmp:Bitmap = addChild(new Bitmap(bmpData)) as Bitmap;<br />
addEventListener(Event.ENTER_FRAME, render);<br />
function render(e:Event):void<br />
{<br />
	s2.x = mouseX;<br />
	s2.y = mouseY;<br />
	bmpData.applyFilter(bmpData, bmpData.rect, new Point(0, 0), new BlurFilter(2, 2, 2));<br />
	bmpData.draw(container);<br />
	var i:int, l:int;<br />
	var aArr:Array = [];<br />
	var c:int;<br />
	for(i = 0; i <= 0xFF; i++)<br />
	{<br />
		c = (i - 0x80) << 1;<br />
		if(c < 0) c = 0;<br />
		aArr[i] = c << 24;<br />
	}<br />
	bmpData.paletteMap(bmpData, bmpData.rect, new Point(0, 0), null, null, null, aArr);<br />
}<br />
</code></p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2010/08/02/fast-metaball-effect-in-as3/&ztz=Fast Metaball Effect in AS3'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2010/08/02/fast-metaball-effect-in-as3/&ztz=Fast Metaball Effect in AS3'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2010/08/02/fast-metaball-effect-in-as3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My first installation, Wi-Fireworks</title>
		<link>http://labs.hellokeita.com/2010/03/27/my-first-installation-wi-fireworks/</link>
		<comments>http://labs.hellokeita.com/2010/03/27/my-first-installation-wi-fireworks/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 02:46:05 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[OpenFrameworks]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hoxton]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wi-fireworks]]></category>
		<category><![CDATA[wifireworks]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=112</guid>
		<description><![CDATA[So, my time has came.
My first installation.
It&#8217;s really simple drawing installation.
You get your iPhone and access the URL from your browser in the instruction on the projection, and just start drawing, and you can see it right away on the projection.
You don&#8217;t need to install any application.
You can check some videos here: http://www.facebook.com/event.php?eid=106749376013168
So, I used [...]]]></description>
			<content:encoded><![CDATA[<p>So, my time has came.<br />
My first installation.</p>
<p>It&#8217;s really simple drawing installation.<br />
You get your iPhone and access the URL from your browser in the instruction on the projection, and just start drawing, and you can see it right away on the projection.<br />
You don&#8217;t need to install any application.</p>
<p>You can check some videos here: <a href="http://www.facebook.com/event.php?eid=106749376013168" target="_blank">http://www.facebook.com/event.php?eid=106749376013168</a></p>
<p>So, I used HTML5 + JavaScript for the web application, PHP for the socket (I know, it&#8217;s not the best solution, but it was what I could&#8217;ve done at this time), C++ &#038; OpenFrameworks for the application running for the projection and a MySQL database to store all the drawn data.</p>
<p>What I&#8217;ve learned from this?<br />
- you don&#8217;t really need to learn Objective-C and pay hundreds to Apple to make some simple application<br />
- don&#8217;t try to do what everyone is doing<br />
- I know c++ now<br />
- flash is slow even on AIR<br />
- sockets on PHP works pretty well<br />
- HTML5 won&#8217;t be replacing Flash any time soon<br />
- people are afraid to do something different at work until someone does something new<br />
- don&#8217;t try to do everything by yourself</p>
<p>Anyway, at the end, everything went well, personally the result was really good.</p>
<p>If you read this post before 29th of March, you can still go check it out at Hoxton Square.</p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2010/03/27/my-first-installation-wi-fireworks/&ztz=My first installation, Wi-Fireworks'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2010/03/27/my-first-installation-wi-fireworks/&ztz=My first installation, Wi-Fireworks'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2010/03/27/my-first-installation-wi-fireworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag and Drop between Flash and HTML</title>
		<link>http://labs.hellokeita.com/2009/10/17/drag-and-drop-between-flash-and-html/</link>
		<comments>http://labs.hellokeita.com/2009/10/17/drag-and-drop-between-flash-and-html/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 16:42:44 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Drag drop]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[HTML flash]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=98</guid>
		<description><![CDATA[A long time I didn&#8217;t code anything in JS&#8230; and I just had an insight.
I don&#8217;t know if it&#8217;s new but at least it&#8217;s interesting for me how we can integrate Flash and HTML contents.
This is just a simple ugly test to drag something from Flash and drop on HTML.
The demo is in this link:http://www.hellokeita.in/xp/DragDrop/
 [...]]]></description>
			<content:encoded><![CDATA[<p>A long time I didn&#8217;t code anything in JS&#8230; and I just had an insight.<br />
I don&#8217;t know if it&#8217;s new but at least it&#8217;s interesting for me how we can integrate Flash and HTML contents.<br />
This is just a simple ugly test to drag something from Flash and drop on HTML.</p>
<p>The demo is in this link:<a href="http://www.hellokeita.in/xp/DragDrop/" target="_blank">http://www.hellokeita.in/xp/DragDrop/</a></p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/10/17/drag-and-drop-between-flash-and-html/&ztz=Drag and Drop between Flash and HTML'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/10/17/drag-and-drop-between-flash-and-html/&ztz=Drag and Drop between Flash and HTML'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/10/17/drag-and-drop-between-flash-and-html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Gesture Source</title>
		<link>http://labs.hellokeita.com/2009/09/25/gesture-source/</link>
		<comments>http://labs.hellokeita.com/2009/09/25/gesture-source/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 00:33:23 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[gesture]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=96</guid>
		<description><![CDATA[So, here is the source for the Gesture Test I posted before.
http://labs.hellokeita.com/files/gesture/gesture.zip
As I said, it&#8217;s really simple, it&#8217;s not the best code but it gives you some ideas of how it&#8217;s made.
Inside the &#8220;tags&#8221; folder, I have three pngs for each shape (triangle, square and circle).
You draw the shape you want, I trim it, and [...]]]></description>
			<content:encoded><![CDATA[<p>So, here is the source for the Gesture Test I posted before.<br />
<a href="http://labs.hellokeita.com/files/gesture/gesture.zip">http://labs.hellokeita.com/files/gesture/gesture.zip</a></p>
<p>As I said, it&#8217;s really simple, it&#8217;s not the best code but it gives you some ideas of how it&#8217;s made.</p>
<p>Inside the &#8220;tags&#8221; folder, I have three pngs for each shape (triangle, square and circle).<br />
You draw the shape you want, I trim it, and compare to each png.<br />
The comparisson is, get the drawn image, stretch it to the size of each png, and apply threshold. The BitmapData.threshold returns you an uint, the number of pixels that has been changed. With this number, divide it to the area of the png, and than, you choose the one that returns you tha smallest number.</p>
<p>and&#8230; that&#8217;s it. simple simple&#8230;</p>
<p>actually, it&#8217;s a technique used for some facial/object recognition softwares, but in a simplified way.</p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/25/gesture-source/&ztz=Gesture Source'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/25/gesture-source/&ztz=Gesture Source'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/09/25/gesture-source/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gesture Test</title>
		<link>http://labs.hellokeita.com/2009/09/24/gesture-test/</link>
		<comments>http://labs.hellokeita.com/2009/09/24/gesture-test/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 00:31:13 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[flash10]]></category>
		<category><![CDATA[gesture]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=93</guid>
		<description><![CDATA[Well, I went to the Flash On The Beach for the first time this year. Was really cool and inspiring.
The first night, I had some inspiration, nothing to deal to any of the presentations I saw, but just something that I wanted to test. I couldn&#8217;t upload it because I didn&#8217;t have internet at the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I went to the Flash On The Beach for the first time this year. Was really cool and inspiring.</p>
<p>The first night, I had some inspiration, nothing to deal to any of the presentations I saw, but just something that I wanted to test. I couldn&#8217;t upload it because I didn&#8217;t have internet at the hotel, and at the venue the firewall was blocking me to connect to my FTP.</p>
<p>So, what was my experiment this time?<br />
Gesture!<br />
I think it&#8217;s working quite nice for a code I took less than an hour to write. It was much easier than I thought.</p>
<p>Just click and try to draw a Triangle, Circle or Square.<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_gesture1_1828852225"
			class="flashmovie"
			width="401"
			height="431">
	<param name="movie" value="/files/gesture/gesture1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/gesture/gesture1.swf"
			name="fm_gesture1_1828852225"
			width="401"
			height="431">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Enjoy!<br />
I&#8217;ll post the source code later&#8230; let me take a nap now.</p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/24/gesture-test/&ztz=Gesture Test'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/24/gesture-test/&ztz=Gesture Test'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/09/24/gesture-test/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LFPUG Presentation and Sources</title>
		<link>http://labs.hellokeita.com/2009/09/07/lfpug-presentation-and-sources/</link>
		<comments>http://labs.hellokeita.com/2009/09/07/lfpug-presentation-and-sources/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 10:01:56 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Komposer]]></category>
		<category><![CDATA[LFPUG]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Sandy3d]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[dynamic sound]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=85</guid>
		<description><![CDATA[As promissed, here is the presentation I made at LFPUG in PDF format.
http://www.hellokeita.in/presentations/LFPUG/20090827/MakingMusicFP10.pdf
And the source files zipped with the demos I showed.
http://www.hellokeita.in/presentations/LFPUG/20090827/examples.zip
The contents are:
Example01-SineWaveExample: Simple example generating a sine wave
Example02-KeyboardExample: Example of a piano keyboard
Example03-WaveformExample: Changing the waveform of a sound
Example04-TimePitchExample: Changing pitch and tempo of a mp3
Example05-HeliumBalloon: Real time pitch shifting using Java
Enjoy!
UPDATE
LFPUG website [...]]]></description>
			<content:encoded><![CDATA[<p>As promissed, here is the presentation I made at LFPUG in PDF format.</p>
<p><a href="http://www.hellokeita.in/presentations/LFPUG/20090827/MakingMusicFP10.pdf" target="_blank">http://www.hellokeita.in/presentations/LFPUG/20090827/MakingMusicFP10.pdf</a></p>
<p>And the source files zipped with the demos I showed.</p>
<p><a href="http://www.hellokeita.in/presentations/LFPUG/20090827/examples.zip" target="_blank">http://www.hellokeita.in/presentations/LFPUG/20090827/examples.zip</a><br />
The contents are:<br />
Example01-SineWaveExample: Simple example generating a sine wave<br />
Example02-KeyboardExample: Example of a piano keyboard<br />
Example03-WaveformExample: Changing the waveform of a sound<br />
Example04-TimePitchExample: Changing pitch and tempo of a mp3<br />
Example05-HeliumBalloon: Real time pitch shifting using Java</p>
<p>Enjoy!</p>
<p><font color="#FF0000">UPDATE</font><br />
LFPUG website uploaded the video of my presentation<br />
<a href="http://www.lfpug.com/flash-10-making-music/" target="_blank">http://www.lfpug.com/flash-10-making-music/</a></p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/07/lfpug-presentation-and-sources/&ztz=LFPUG Presentation and Sources'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/09/07/lfpug-presentation-and-sources/&ztz=LFPUG Presentation and Sources'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/09/07/lfpug-presentation-and-sources/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Controlling Pitch and Tempo</title>
		<link>http://labs.hellokeita.com/2009/05/20/controlling-pitch-and-tempo/</link>
		<comments>http://labs.hellokeita.com/2009/05/20/controlling-pitch-and-tempo/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:44:10 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Komposer]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[dynamic sound]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[generative sound]]></category>
		<category><![CDATA[Mario]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=58</guid>
		<description><![CDATA[UPDATE: fixed the clicking noise correcting the zero-crossing, thanks to Caco Teixeira
Just another test now controlling the pitch and the tempo of the playback.
Source&#8230; soon, I&#8217;m re-writing the classes trying new approaches.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_MarioPitchTempo_0.2_1786598748"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/komposer/MarioPitchTempo_0.2.swf" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/komposer/MarioPitchTempo_0.2.swf"
			name="fm_MarioPitchTempo_0.2_1786598748"
			width="400"
			height="300">
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
 Vote]]></description>
			<content:encoded><![CDATA[<p><font color="#0000FF">UPDATE: fixed the clicking noise correcting the zero-crossing, thanks to <a href="http://www.sonoplastico.com/" target="_blank">Caco Teixeira</a></font></p>
<p>Just another test now controlling the pitch and the tempo of the playback.<br />
Source&#8230; soon, I&#8217;m re-writing the classes trying new approaches.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_MarioPitchTempo_0.2_2122035716"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/komposer/MarioPitchTempo_0.2.swf" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/komposer/MarioPitchTempo_0.2.swf"
			name="fm_MarioPitchTempo_0.2_2122035716"
			width="400"
			height="300">
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/05/20/controlling-pitch-and-tempo/&ztz=Controlling Pitch and Tempo'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/05/20/controlling-pitch-and-tempo/&ztz=Controlling Pitch and Tempo'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/05/20/controlling-pitch-and-tempo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multi Bézier Curve</title>
		<link>http://labs.hellokeita.com/2009/03/12/multi-bezier-curve/</link>
		<comments>http://labs.hellokeita.com/2009/03/12/multi-bezier-curve/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 01:56:37 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Bézier]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[as3 bezier]]></category>
		<category><![CDATA[beziercurve]]></category>
		<category><![CDATA[cubic]]></category>
		<category><![CDATA[curve]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[quadratic]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/?p=34</guid>
		<description><![CDATA[What is Bezier?
Simply explaining for dummy AS programmers, is what graphics.curveTo method does.
If you want to learn more, here is the Wikipedia article.
Basically, the curveTo method uses a quadratic bézier, so you need a control point and a anchor point.
But it&#8217;s difficult to find the precise control point for a curve you want, because the [...]]]></description>
			<content:encoded><![CDATA[<p>What is Bezier?<br />
Simply explaining for dummy AS programmers, is what <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html" target="_blank">graphics.curveTo</a> method does.<br />
If you want to learn more, <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve" target="_blank">here is the Wikipedia article</a>.</p>
<p>Basically, the curveTo method uses a quadratic bézier, so you need a control point and a anchor point.<br />
But it&#8217;s difficult to find the precise control point for a curve you want, because the control point is not inside the curve.<br />
Also, you just can create a curve with just one control point, or if you want to use many curveTo methods in sequence, sometimes the curve doesn&#8217;t became as straight as you want.</p>
<p>So, I created a class that calculates the control points with multiple values bézier.<br />
You can also get the position in this curve.</p>
<p>Here goes the examples. (you can click and drag the points)</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SimpleMultiBezier_1709844693"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/multiBezier/SimpleMultiBezier.swf" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/multiBezier/SimpleMultiBezier.swf"
			name="fm_SimpleMultiBezier_1709844693"
			width="400"
			height="300">
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
This is an example using 7 positions, the start and the end anchors and 5 control points.<br />
In the class, there&#8217;s a method that returns me an array with the approximated quadratic bézier values, so I&#8217;m using this values to draw the green line.<br />
You see that it still hard to draw a path that you want.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_InsetMultiBezier_862919847"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/multiBezier/InsetMultiBezier.swf" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/multiBezier/InsetMultiBezier.swf"
			name="fm_InsetMultiBezier_862919847"
			width="400"
			height="300">
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
This is the same example, but now the positions are inset in the curve.<br />
Now, it became easier to create a curve line.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_BezierAnim_1914843090"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/multiBezier/BezierAnim.swf" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/multiBezier/BezierAnim.swf"
			name="fm_BezierAnim_1914843090"
			width="400"
			height="300">
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
And here, a animation over the curve.</p>
<p>Sorry for lack of explanation, actually I&#8217;m in vacation now, but I wanted to post this class.<br />
Later I&#8217;ll try to post more examples and uses.</p>
<p>I will try to update my svn with these classes, commented, after I came back from vacation.<br />
So, for now, <a href="http://labs.hellokeita.com/files/multiBezier/BezierTest.zip">here is the source code</a>.</p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/03/12/multi-bezier-curve/&ztz=Multi Bézier Curve'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2009/03/12/multi-bezier-curve/&ztz=Multi Bézier Curve'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2009/03/12/multi-bezier-curve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My own 3d engine&#8230;</title>
		<link>http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/</link>
		<comments>http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 20:13:38 +0000</pubDate>
		<dc:creator>keita</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Papervision3d]]></category>
		<category><![CDATA[Sandy3d]]></category>

		<guid isPermaLink="false">http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/</guid>
		<description><![CDATA[Uff&#8230; long time I don&#8217;t write here&#8230;
So&#8230; what I have been doing?
Actually&#8230; nothing interesting&#8230;
Then, couple days ago I started developing my own 3d engine.
I won&#8217;t make it public because it will take all my free time that I actually don&#8217;t have&#8230;
I didn&#8217;t run any benchmarks, I think it&#8217;s more heavy processing than Papervision3d.
anyway&#8230; here is [...]]]></description>
			<content:encoded><![CDATA[<p>Uff&#8230; long time I don&#8217;t write here&#8230;</p>
<p>So&#8230; what I have been doing?<br />
Actually&#8230; nothing interesting&#8230;<br />
Then, couple days ago I started developing my own 3d engine.<br />
I won&#8217;t make it public because it will take all my free time that I actually don&#8217;t have&#8230;</p>
<p>I didn&#8217;t run any benchmarks, I think it&#8217;s more heavy processing than Papervision3d.</p>
<p>anyway&#8230; here is it&#8230;</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_20080213_1822695492"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="/files/k3d/20080213.swf" />
	<param name="bgcolor" value="#ffffff" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/files/k3d/20080213.swf"
			name="fm_20080213_1822695492"
			width="400"
			height="300">
		<param name="bgcolor" value="#ffffff" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/&ztz=My own 3d engine...'><img src='http://labs.hellokeita.com/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='padding:0px 5px 0px 0px;vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a> <span style='vertical-align:middle'><a href='http://www.hexosearch.com/se/submit.aspx?zlvz=2&zqz=&zurlz=http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/&ztz=My own 3d engine...'>Vote</a></span>]]></content:encoded>
			<wfw:commentRss>http://labs.hellokeita.com/2008/02/13/my-own-3d-engine/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

