<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pixelero</title>
	<atom:link href="http://pixelero.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pixelero.wordpress.com</link>
	<description>Just another Flash/actionscript/whatever weblog</description>
	<pubDate>Tue, 29 Jul 2008 06:34:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Various functions with modulo</title>
		<link>http://pixelero.wordpress.com/2008/07/28/various-functions-with-modulo/</link>
		<comments>http://pixelero.wordpress.com/2008/07/28/various-functions-with-modulo/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 18:16:55 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[pixel bender]]></category>

		<category><![CDATA[function]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[modulo]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=72</guid>
		<description><![CDATA[Some functions using the modulo-operation (mod, %, remainder) :
basic case: y=x%100, value waves between 0 and 99:

Additions:
addition of two different modulos: y=(x%100+x%79)/2

addition of three: y=(x%100+x%31+x%79)/3. I divide by n to get a result easier to compare, with f&#8217;(x)=1 when defined &#8230;

addition of four - and we&#8217;re approaching a fractal wave: y=(x%100 + x%79 + x%31 [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some functions using the <a href="http://en.wikipedia.org/wiki/Modulo_operation" target="wiki">modulo-operation</a> (mod, %, remainder) :</p>
<p>basic case: y=x%100, value waves between 0 and 99:<br />
<img src="http://www.petrileskinen.fi/random/modulo/modulo100.gif" alt="x%100" /></p>
<p>Additions:</p>
<p>addition of two different modulos: y=(x%100+x%79)/2<br />
<img src="http://www.petrileskinen.fi/random/modulo/moduloAddition2.gif" alt="x%100" /><br />
addition of three: y=(x%100+x%31+x%79)/3. I divide by n to get a result easier to compare, with f&#8217;(x)=1 when defined &#8230;<br />
<img src="http://www.petrileskinen.fi/random/modulo/moduloAddition3.gif" alt="x%100" /><br />
addition of four - and we&#8217;re approaching a fractal wave: y=(x%100 + x%79 + x%31 + x%17)/4<br />
<img src="http://www.petrileskinen.fi/random/modulo/moduloAddition4.gif" alt="x%100" /></p>
<p>Subtract:</p>
<p>Subtracting two modulos: y=x%50 -x%30 - tops of the levels are horizontal e.g. f&#8217;(x)=0 when defined<br />
<img src="http://www.petrileskinen.fi/random/modulo/moduloSubtract2.gif" alt="x%100" /><br />
and four y=x%50 -x%30 +x%20 -x%12, a &#8216;city skyline&#8217;-function<br />
<img src="http://www.petrileskinen.fi/random/modulo/moduloSubtract4.gif" alt="x%100" /></p>
<p>ZigZags:</p>
<p>A zigzag function: y=|x%(2*m)-m| : m= wave&#8217;s height, 2*m = wavelength:<br />
<img src="http://www.petrileskinen.fi/random/modulo/zigzag25.gif" alt="x%100" /><br />
In the <a href="http://www.petrileskinen.fi/random/modFunction.html" target="Petri">javascript-demo</a> I defined a special function for that:<br />
<code><br />
function zigzag(x,m) {<br />
return Math.abs(x%(2*m)-m);<br />
}</code><br />
adding two zigzags, y=zigzag(x,25) +zigzag(x,15):<br />
<img src="http://www.petrileskinen.fi/random/modulo/zigzag25+15.gif" alt="x%100" /><br />
&#8230; and three, y=zigzag(x,25) +zigzag(x,21)+zigzag(x,15), for a &#8216;random&#8217; mountain silhuette:<br />
<img src="http://www.petrileskinen.fi/random/modulo/zigzag25+21+15.gif" alt="x%100" /></p>
<p><a href="http://www.petrileskinen.fi/random/modFunction.html" target="Leskinen"> small javascript-demo for testing</a></p>
<p>Pixel Bendel -code as an example of this in 2D, creating a &#8216;random&#8217; size tiling:<br />
<a href="http://flickr.com/photos/pixelero/2710886072/in/set-72157603676008625/" target="Leskinen"><img src="http://farm4.static.flickr.com/3189/2710886072_d75b88c31e_m.jpg" alt="" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/72/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/72/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=72&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/07/28/various-functions-with-modulo/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/modulo100.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/moduloAddition2.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/moduloAddition3.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/moduloAddition4.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/moduloSubtract2.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/moduloSubtract4.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/zigzag25.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/zigzag25+15.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/random/modulo/zigzag25+21+15.gif" medium="image">
			<media:title type="html">x%100</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3189/2710886072_d75b88c31e_m.jpg" medium="image" />
	</item>
		<item>
		<title>Flash 10, Part 3 of testing graphics.drawPath() : drawTriangles</title>
		<link>http://pixelero.wordpress.com/2008/07/14/flash-10-part-3-of-testing-graphicsdrawpath-drawtriangles/</link>
		<comments>http://pixelero.wordpress.com/2008/07/14/flash-10-part-3-of-testing-graphicsdrawpath-drawtriangles/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 14:02:55 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[actionscript 3.0]]></category>

		<category><![CDATA[Adobe]]></category>

		<category><![CDATA[as3]]></category>

		<category><![CDATA[drawTriangles]]></category>

		<category><![CDATA[flash 10]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[perlinNoise]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=60</guid>
		<description><![CDATA[Waves from a PerlinNoise:



Source codes: PerlinWaves.as  and PerlinWavesMain.as 
&#8212;
FreeTransform:



Source codes: FreeTransform.as  and FreeTransformDemo.as As a principle that&#8217;s a cubic spline with two parameters
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Waves from a PerlinNoise:<br />
<a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/PerlinWavesMain.swf"><br />
<img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/PerlinWavesScreenshot.png" border="0" alt="Perlin Waves by Petri Leskinen" /><br />
</a><br />
Source codes: <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/PerlinWaves.as">PerlinWaves.as </a> and <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/PerlinWavesMain.as">PerlinWavesMain.as </a><br />
&#8212;</p>
<p>FreeTransform:<br />
<a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransformDemo.swf"><br />
<img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransform01.png" border="0" alt="FreeTransform by Petri Leskinen" /><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransform02.png" border="0" alt="FreeTransform by Petri Leskinen" /><br />
</a><br />
Source codes: <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransform.as">FreeTransform.as </a> and <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransformDemo.as">FreeTransformDemo.as </a><br />As a principle that&#8217;s a <a href="http://mathworld.wolfram.com/CubicSpline.html">cubic spline</a> with two parameters</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/60/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/60/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=60&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/07/14/flash-10-part-3-of-testing-graphicsdrawpath-drawtriangles/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/PerlinWavesScreenshot.png" medium="image">
			<media:title type="html">Perlin Waves by Petri Leskinen</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransform01.png" medium="image">
			<media:title type="html">FreeTransform by Petri Leskinen</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/drawTriangles/FreeTransform02.png" medium="image">
			<media:title type="html">FreeTransform by Petri Leskinen</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash 10, Part 2 of testing graphics.drawPath() : CURVE_TO</title>
		<link>http://pixelero.wordpress.com/2008/07/12/flash-10-part-2-of-testing-graphicsdrawpath-curve_to/</link>
		<comments>http://pixelero.wordpress.com/2008/07/12/flash-10-part-2-of-testing-graphicsdrawpath-curve_to/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 20:08:08 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[curveTo]]></category>

		<category><![CDATA[flash 10 astro]]></category>

		<category><![CDATA[perlinNoise]]></category>

		<category><![CDATA[vector graphics]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=52</guid>
		<description><![CDATA[Continuing my earlier post &#8230;
… you’ll need the Flash Player 10 Beta to view these demos correctly !
Simple demo converting perlinNoise to polar coordinates in vector format: source code

Groovy flower ... (not very much commented) source code :

&#8230; and a couple of more:
 
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Continuing <a href="http://pixelero.wordpress.com/2008/06/24/flash-10-testing-graphicsdrawpath/">my earlier post</a> &#8230;<br />
… you’ll need the Flash Player 10 Beta to view these demos correctly !</p>
<p>Simple demo converting perlinNoise to polar coordinates in vector format: <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial.as">source code</a></p>
<p><a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial.html"><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve01.png" alt="" /></a></p>
<p>Groovy flower .<a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial2.as">.. (not very much commented) source code :</a><br />
<a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial2.html"><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve02.png" border="0" alt="CURVE_TO 2" /></a></p>
<p>&#8230; and a couple of more:<br />
<a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial3.html"><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve03.png" border="0" alt="CURVE_TO 3" /></a> <a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsRadial4.html"><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve04.png" border="0" alt="CURVE_TO 4" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=52&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/07/12/flash-10-part-2-of-testing-graphicsdrawpath-curve_to/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve01.png" medium="image" />

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve02.png" medium="image">
			<media:title type="html">CURVE_TO 2</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve03.png" medium="image">
			<media:title type="html">CURVE_TO 3</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/CURVE_TO/GraphicsCurve04.png" medium="image">
			<media:title type="html">CURVE_TO 4</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash 10, testing graphics.drawPath()</title>
		<link>http://pixelero.wordpress.com/2008/06/24/flash-10-testing-graphicsdrawpath/</link>
		<comments>http://pixelero.wordpress.com/2008/06/24/flash-10-testing-graphicsdrawpath/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 18:20:44 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[bitmapData]]></category>

		<category><![CDATA[drawPath]]></category>

		<category><![CDATA[flash 10 astro]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[perlinNoise]]></category>

		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=24</guid>
		<description><![CDATA[

&#8230; you&#8217;ll need the Flash Player 10 Beta to view the demos correctly !
Here&#8217;s some results from testing the new methods in Flash 10 graphics:
method drawPath(commands:Vector, data:Vector, winding:String = &#8220;evenOdd&#8221;)
commands: Vector of Strings holding info like MOVE_TO, LINE_TO, CURVE_TO etc,
data: Vector of Numbers defining the x,y -coordinates for line graphics
In the demo I take two [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/GraphicsPathTest2.html" target="GraphicsPathTest"><br />
<img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/GraphicsPathTest2.gif" border="0" alt="actionscript 3.0, graphics.drawPath() -test" /></a></p>
<p>&#8230; you&#8217;ll need the Flash Player 10 Beta to view the demos correctly !</p>
<p>Here&#8217;s some results from testing the new methods in Flash 10 graphics:<br />
method <a href="http://astro.flexcoders.nl/flash/display/Graphics.html#drawPath()" target="drawPath">drawPath</a>(commands:Vector, data:Vector, winding:String = &#8220;evenOdd&#8221;)<br />
commands: Vector of Strings holding info like <a href="http://astro.flexcoders.nl/flash/display/GraphicsPathCommand.html" target="refs">MOVE_TO, LINE_TO, CURVE_TO</a> etc,<br />
data: Vector of Numbers defining the x,y -coordinates for line graphics<br />
In the demo I take two horizontal lines of the bitmap with perlinNoise, and create curves with y by pixels value.</p>
<p>Essential parts of the code:</p>
<pre>	private var _commands:Vector.&lt;int&gt; = new Vector.&lt;int&gt;();
	private var _dataUint:Vector.&lt;uint&gt;;
	private	var _dataVector:Vector.&lt;Number&gt;;

	<span style="color:#808080;">// ...

</span>	<span style="color:#808080;">// It's enough to define _commands once</span>
	<span style="color:#808080;">// The command serie starts with MOVE_TO,</span>
	<span style="color:#808080;">// All the following commands are LINE_TO</span>
	_commands.push(GraphicsPathCommand.MOVE_TO);
	for (i=1 ; i!=n+n; i++) {
		_commands.push(GraphicsPathCommand.LINE_TO);
	}

	<span style="color:#808080;">// ...</span>

	<span style="color:#808080;">// BitmapData.getVector returns the values as uints 0xHHHHHHHH</span>
	_dataUint = perlinData.getVector(new Rectangle(0,0,n,2));

	_dataVector = new Vector.&lt;Number&gt;() ;

	<span style="color:#808080;">// First the upper row from left to right</span>
	<span style="color:#808080;">// coordinates x = i, y = blue channel's value from bitmap</span>
	for (i=0 ; i!=n; i++) {
		_dataVector.push( i, _dataUint[i] &amp; 0xFF );
	}
	<span style="color:#808080;">// Then the lower row from right to left</span>
	for (i=n-1 ; i!=-1; i--) {
		_dataVector.push( i, _dataUint[n+i] &amp; 0xFF );
	}

	<span style="color:#808080;">// Draw the new graphics</span>
	with (this.graphics) {
		clear();
		beginFill(0x00,1.0);
		lineStyle(1.0,0x00);
		drawPath(_commands, _dataVector);
		endFill();
	}</pre>
<p><a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/GraphicsPathTest2.as">&#8230; source for flash10</a></p>
<p>In the demo you&#8217;ll see the 10-version above and 9-version below.<br />
The <a href="http://astro.flexcoders.nl/flash/display/Graphics.html#drawPath()">reference</a> says: <em>This method sends commands to the renderer much faster than when using the lineTo() and curveTo() methods. However, this only matters if your code is bottlenecked in getting commands to the renderer. Otherwise using this method will not give a performance increase.</em> Well, at least in this case there was difference: I did some further performance testing and, depending on the situation like here for a path with a length of 1024 points, seems to be 5 to 10 times faster than the old methods - running 100 times gave <strong>~50ms</strong> for flash10 and <strong>~470ms</strong> for flash9.<br />
It not only spares you from using a for() -loop but also allows to easily repeat, why not also save and load, the same graphics. Generally, for visuality, drawPath() doesn&#8217;t offer anything new - only in a faster and more advanced way.</p>
<p>In case you don&#8217;t yet feel familiar with the new classes and methods, here&#8217;s for comparison the same written in flash9 actionscript:</p>
<pre>	with (this.graphics) {
		clear();
		beginFill(0x00,1.0);
		lineStyle(1.0,0x00);

		moveTo(0,perlinData.getPixel(0,0) &amp; 0xFF);

		<span style="color:#808080;">// point's y-value is red from the bitmapdata</span>
		<span style="color:#808080;">// First the upper row from left to right</span>
		for (i=0 ; i!=n; i++) {
			this.graphics.lineTo(i,perlinData.getPixel(i,0) &amp; 0xFF);
		}

		<span style="color:#808080;">// Then the lower row from right to left</span>
		for (i=n-1 ; i!=-1; i--) {
			this.graphics.lineTo(i,perlinData.getPixel(i,1) &amp; 0xFF);
		}
		endFill();
	}</pre>
<p><a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/GraphicsPathTest2versio9.as">&#8230; source for flash9</a></p>
<p>&#8212;</p>
<p><a href="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/PerlinDancer.html" target="PerlinDancer"><img src="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/perlinDancer2.png" alt="" /><br />
PerlinDancer &#8230; Another demo </a>with a bit different code: here both x- and y-coordinates are created by perlinNoise:</p>
<pre>	_dataUint = perlinData.getVector(new Rectangle(0,0,2,n));
	_dataVector = new Vector.&lt;Number&gt;(2*n,false);

	i=0;
	for each (var value in _dataUint) {
		_dataVector[i++] = Number ( (value &amp; 0xFF)&lt;&lt;1 );
	}

	with (this.graphics) {
		clear();
		beginFill(color,1.0);
		lineStyle(1.0,color);
		drawPath(_commands, _dataVector);
		endFill();
	}</pre>
<p>Why always perlinNoise? I donno, at least it&#8217;s easily available and so often gives surprisingly nice and versatile results &#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=24&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/06/24/flash-10-testing-graphicsdrawpath/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/GraphicsPathTest2.gif" medium="image">
			<media:title type="html">actionscript 3.0, graphics.drawPath() -test</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/GraphicsPathTest/perlinDancer2.png" medium="image" />
	</item>
		<item>
		<title>Flash 10: new method BitmapData.histogram();</title>
		<link>http://pixelero.wordpress.com/2008/06/19/flash-10-bitmapdatahistogram/</link>
		<comments>http://pixelero.wordpress.com/2008/06/19/flash-10-bitmapdatahistogram/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 18:44:39 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[bitmapData]]></category>

		<category><![CDATA[flash 10 astro]]></category>

		<category><![CDATA[histogram]]></category>

		<category><![CDATA[vector]]></category>

		<category><![CDATA[ColorMatrix]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=22</guid>
		<description><![CDATA[this demo requires Flash 10 Beta installed:

Extract from as3 language reference:
histogram()	method
flash10 function histogram(hRect:Rectangle = null):Vector
Language Version : 	ActionScript 3.0
Player Version : 	Flash Player 10
Computes a 256 bin histogram of a BitmapData object.
The functions returns a vector of 4 number vectors.
The 4 number vectors represent the red, green, blue
and alpha components respectively. Each number vector
contains 256 [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>this demo requires <a target="Astro" href="http://labs.adobe.com/technologies/flashplayer10/">Flash 10 Beta</a> installed:<br />
<a href="http://www.petrileskinen.fi/Actionscript/HistogramTest/HistogramTest.html"><img src="http://www.petrileskinen.fi/Actionscript/HistogramTest/HistogramTest.jpg" border="0" alt="" /></a></p>
<p><a href="http://www.petrileskinen.fi/Actionscript/HistogramTest/BitmapData.html#histogram()">Extract from as3 language reference</a>:</p>
<p>histogram()	method</p>
<p style="padding-left:30px;">flash10 function histogram(hRect:Rectangle = null):Vector</p>
<p style="padding-left:30px;">Language Version : 	ActionScript 3.0<br />
Player Version : 	Flash Player 10</p>
<p style="padding-left:30px;">Computes a 256 bin histogram of a BitmapData object.<br />
The functions returns a vector of 4 number vectors.<br />
The 4 number vectors represent the red, green, blue<br />
and alpha components respectively. Each number vector<br />
contains 256 values which represent the population count<br />
of a indivual component value, from 0 to 255.</p>
<p style="padding-left:30px;">Parameters<br />
hRect:Rectangle (default = null) — The area of the BitmapData<br />
object that should be used.</p>
<p style="padding-left:30px;">Returns Vector</p>
<p><span style="color:#101010;">some code snippet from my demo:</span></p>
<p>function updateHistograms(bmpData:BitmapData,<br />
sprites:Vector.&lt;Sprite&gt;):void {</p>
<p style="padding-left:30px;"><span style="color:#a0a0a0;">// histogram is a Vector in two dimensions<br />
// notice the interesting type Vector.&lt;Vector.&lt;Number&gt;&gt;</span><br />
var hst:Vector.&lt;Vector.&lt;Number&gt;&gt; = bmpData.histogram();</p>
<p style="padding-left:30px;">var height:int=128; <span style="color:#a0a0a0;">// height for diagrams</span><br />
var maxValue:Number;<br />
var value:Number;<br />
var i:int;<br />
var clr:int = 16; <span style="color:#a0a0a0;">// value for bitwise shift left, start with red</span><br />
<span style="color:#a0a0a0;"> // channel = 0:red, 1:green, 2:blue </span></p>
<p style="padding-left:30px;">for (var channel:int = 0; channel!=3; channel++) {</p>
<p style="padding-left:60px;"><span style="color:#a0a0a0;"> // find the max value on the histogram,</span><br />
<span style="color:#a0a0a0;"> // i goes from 1 to 254,</span><br />
<span style="color:#a0a0a0;"> // I discarded the 0 and 0xFF values to get a better balanced chart</span></p>
<p style="padding-left:60px;">maxValue =0.0;<br />
for (i=1; i!=255; i++) {<br />
value = hst[channel][i];<br />
maxValue = value&gt;maxValue ? value : maxValue;<br />
}</p>
<p style="padding-left:60px;">with (sprites[channel].graphics) {<br />
<span style="color:#a0a0a0;"> // empty and white background</span><br />
clear();<br />
beginFill(0xFFFFFF,1.0);<br />
drawRect(0,0,255,height);<br />
<span style="color:#a0a0a0;">// draw a vertical line for each value with a corresponding color</span></p>
<p style="padding-left:60px;">i=0;<br />
for each(value in hst[channel]) {<br />
lineStyle(1.0,i&lt;&lt;clr) ;<br />
moveTo(i,height);<br />
lineTo(i++,Math.max(0.0,height-value*height/maxValue) );<br />
}</p>
<p style="padding-left:30px;">}<br />
clr -= 8;<br />
}<br />
}</p>
<p>In the demo I used <a href="http://www.gskinner.com/blog/archives/2007/12/colormatrix_upd.html" target="gskinner">Grant Skinner&#8217;s ColorMatrix</a> for manipulating the image.</p>
<p><span style="color:#101010;">&#8230; two other new methods for BitmapData are <a href="http://www.petrileskinen.fi/Actionscript/HistogramTest/BitmapData.html#getVector()" target="getvct">getVector() </a> and <a href="http://www.petrileskinen.fi/Actionscript/HistogramTest/BitmapData.html#setVector()" target="setvct">setVector()</a></span><span style="color:#101010;"> working just like older getPixels and setPixels-methods except with a Vector of uints, length = width x height:<br />
like for instance copying pixels from 0,0 - 49,49 to 100,100 - 149,149:</span></p>
<p>var bmpVct:Vector.&lt;uint&gt; = bmpData.getVector(new Rectangle(0,0,50,50));<br />
bmpData.setVector(new Rectangle(100,100,50,50),bmpVct);</p>
<p><span style="color:#101010;"> And an example of experimental image manipulation of <a href="http://www.flickr.com/photos/pixelero/2649743073/">sorting by the pixel value</a> <a href="http://www.flickr.com/photos/pixelero/2649743073/" title="Sorted pixels by piXelero, on Flickr"><img src="http://farm4.static.flickr.com/3090/2649743073_3270fcfc64_t.jpg" width="72" height="100" alt="Sorted pixels" /></a></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=22&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/06/19/flash-10-bitmapdatahistogram/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/HistogramTest/HistogramTest.jpg" medium="image" />

		<media:content url="http://farm4.static.flickr.com/3090/2649743073_3270fcfc64_t.jpg" medium="image">
			<media:title type="html">Sorted pixels</media:title>
		</media:content>
	</item>
		<item>
		<title>Pixel Bender: HexCells</title>
		<link>http://pixelero.wordpress.com/2008/06/12/pixel-bender-hexcells/</link>
		<comments>http://pixelero.wordpress.com/2008/06/12/pixel-bender-hexcells/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 17:17:11 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<category><![CDATA[pixel bender]]></category>

		<category><![CDATA[demo]]></category>

		<category><![CDATA[flash 10 astro]]></category>

		<category><![CDATA[hexagon]]></category>

		<category><![CDATA[tesselation]]></category>

		<category><![CDATA[tiling]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=20</guid>
		<description><![CDATA[Pixel Bender -filter for tiling with regular hexagons, and as a tutorial a couple of words to explain how this hexagonalization was done:

//
// leskinen.petri[at]luukku.com
// Espoo, Finland, 25 Feb, 2008 - June 2008
//

&#60;languageVersion: 1.0;&#62;
kernel HexCells
&#60;   namespace : &#8220;Hex cells - not just pixels&#8221;;
vendor : &#8220;Petri Leskinen&#8221;;
version : 1;
description : &#8220;Hexagonal Tiling&#8221;;
&#62;
{
parameter float size
&#60;
minValue: float(1);
maxValue: [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Pixel Bender -filter for tiling with regular hexagons, and as a tutorial a couple of words to explain how this hexagonalization was done:</p>
<p><a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=authorExtensions&amp;authorid=92126618" target="Leskinen"><img src="http://farm4.static.flickr.com/3031/2572702685_ef07461a6f.jpg" alt="" /></a></p>
<div style="font:'Courier New', Courier, monospace;">//<br />
<span style="color:#007f00;">// leskinen.petri[at]luukku.com</span><br />
<span style="color:#007f00;">// Espoo, Finland, 25 Feb, 2008 - June 2008</span><br />
//</div>
<div style="font:'Courier New', Courier, monospace;">
<p>&lt;<span style="color:#0000ff;">languageVersion</span>: <span style="font-style:italic;color:#006600;">1.0</span>;&gt;<br />
<span style="color:#0000cc;">kernel</span> HexCells<br />
&lt;   <span style="color:#0000ff;">namespace</span> : <span style="color:#880000;">&#8220;Hex cells - not just pixels&#8221;</span>;<br />
<span style="color:#0000ff;">vendor</span> : <span style="color:#880000;">&#8220;Petri Leskinen&#8221;</span>;<br />
<span style="color:#0000ff;">version</span> : 1;<br />
<span style="color:#0000ff;">description</span> : <span style="color:#880000;">&#8220;Hexagonal Tiling&#8221;</span>;<br />
&gt;</p>
<p>{</p></div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000cc;">parameter</span> <span style="color:#0000aa;">float</span> size</div>
<div style="font:'Courier New', Courier, monospace;">&lt;</div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000ff;">minValue</span>: <span style="color:#0000aa;">float</span>(<span style="font-style:italic;color:#006600;">1</span>);</div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000ff;">maxValue</span>: <span style="color:#0000aa;">float</span>(<span style="font-style:italic;color:#006600;">200</span>);</div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000ff;">defaultValue</span>: <span style="color:#0000aa;">float</span>(<span style="font-style:italic;color:#006600;">50</span>);</div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000ff;">description</span>: <span style="color:#880000;">&#8220;Hexagon Size&#8221;</span>;</div>
<div style="font:'Courier New', Courier, monospace;">&gt;;</div>
<div style="font:'Courier New', Courier, monospace;"><span style="color:#0000cc;">parameter</span> <span style="color:#0000aa;">float2</span> base<br />
&lt;<br />
<span style="color:#0000ff;">minValue</span>: <span style="color:#0000aa;">float2</span>(<span style="font-style:italic;color:#006600;">-200</span>,<span style="font-style:italic;color:#006600;">-200</span>);<br />
<span style="color:#0000ff;">maxValue</span>: <span style="color:#0000aa;">float2</span>(<span style="font-style:italic;color:#006600;">800</span>,<span style="font-style:italic;color:#006600;">500</span>);<br />
<span style="color:#0000ff;">defaultValue</span>: <span style="color:#0000aa;">float2</span>(<span style="font-style:italic;color:#006600;">400</span>,<span style="font-style:italic;color:#006600;">250</span>);<br />
<span style="color:#0000ff;">description</span>: <span style="color:#880000;">&#8220;base point&#8221;</span>;<br />
&gt;;<span style="color:#007f00;">// some constants needed for hexagon maths</span><br />
<span style="color:#0000cc;">const</span> <span style="color:#0000aa;">float</span> sqrt3 = <span style="font-style:italic;color:#006600;">1.7320508076</span>;<br />
<span style="color:#0000cc;">const</span> <span style="color:#0000aa;">float</span> halfSqrt3 = <span style="font-style:italic;color:#006600;">0.866025404</span>;</p>
<p><span style="color:#0000cc;">input</span> <span style="color:#0000aa;">image4</span> img;<br />
<span style="color:#0000cc;">output</span> <span style="color:#0000aa;">pixel4</span> pxl;</p>
<p><span style="color:#0000aa;">void</span> <span style="color:#0000cc;">evaluatePixel</span>()<br />
{<br />
<span style="color:#007f00;">//  Tiling by counting a distance to two regular grids,</span><br />
<span style="color:#007f00;">//  and choosing the sample point of the closer one</span><br />
<span style="color:#007f00;">//  Scales of this transformation are &#8217;size&#8217; in x-direction</span><br />
<span style="color:#007f00;">//  and sqrt(3)*size in y-direction </span></p>
<p><span style="color:#0000aa;">float2</span> grid = <span style="color:#0000aa;">float2</span>(size,sqrt3*size);</p>
<p><span style="color:#007f00;">// First grid ( like red dots in the above image )</span><br />
<span style="color:#007f00;">//  to get regular &#8216;pixelation&#8217; we first divide by grid size,</span><br />
<span style="color:#007f00;">//  apply &#8216;floor&#8217; and then multiply back</span></p>
<p><span style="color:#0000aa;">float2</span> po1 = <span style="color:#0000ff;">floor</span>((<span style="color:#0000ff;">outCoord</span>()-base)/grid+0.5);<br />
po1 = po1*grid +base -outCoord();</p>
<p><span style="color:#007f00;">// squared distance to a center point of that</span><br />
<span style="color:#007f00;">// (we only compare the distances, so no reason applying &#8216;heavy&#8217; sqrt-operation )</span><br />
<span style="color:#0000aa;">float</span> dst1 = po1.x*po1.x + po1.y*po1.y;</p>
<p><span style="color:#007f00;">// Same thing with the Second grid (blue dots):</span><br />
<span style="color:#007f00;">//  base point here is in the middle of first grid</span><br />
<span style="color:#0000aa;">float2</span> base2 = base+size*float2(<span style="font-style:italic;color:#006600;">0.5</span>,halfSqrt3);</p>
<p><span style="color:#0000aa;">float2</span> po2 = <span style="color:#0000ff;">floor</span>((<span style="color:#0000ff;">outCoord</span>()-base2)/grid+0.5);<br />
po2 = po2*grid +base2 -outCoord();</p>
<p><span style="color:#007f00;">// second distance</span><br />
<span style="color:#0000aa;">float</span> dst2 = po2.x*po2.x + po2.y*po2.y;</p>
<p><span style="color:#007f00;">// pick the closer point for sampling :</span></p>
<p>po1= (dst1&lt;dst2) ? po1 : po2;<br />
pxl= <span style="color:#0000ff;">sampleNearest</span>(img, po1+outCoord());</p>
<p>}</p>
<p>}</p></div>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p><a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=authorExtensions&amp;authorid=92126618" target="Leskinen">PB-bytecode in Adobe Exchange</a></p>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p><a href="http://www.petrileskinen.fi/Actionscript/HexCells/HexCells.html" target="Petri">DEMO (for Flash Player 10 beta) featuring also FileReference.load() and .save() - up&#8217;n'download your own picture to player !</a> ps. If you try save, do not overwrite an older file, it has a <a href="http://bugs.adobe.com/jira/browse/FP-276" target="bug">know bug</a>. &#8230; and <a href="http://farm3.static.flickr.com/2316/2574635055_a9fabba9e2.jpg">here&#8217;s an <span style="font-style:italic;color:#0000ff;">hexsample</span></a> of same image saved and loaded a couple of times</p>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p>I used Kevin Goldsmith&#8217;s <a href="http://blogs.adobe.com/kevin.goldsmith/2008/05/pixel_bender_ht.html" target="kevin">PB HTML formatter</a> for code hilighting - although pasting to this site didn&#8217;t support all the tabs &#8230;</p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
When it comes to the algorithm for hexagonal tiling as explained above, there might be some &#8217;simplier&#8217; ways of achieving it - as maths it&#8217;s ancient stuff. Anyway, when I first tried googling for more info and perhaps some code snippets, somehow I didn&#8217;t came up with any generally useful examples, in case of pixel manipulation algorithm. Nevertheless I did find a whole lot of inspirating stuff such as <a href="http://www.szinhaz.hu/edan/SpidroNew/">Spidrons</a> or <a href="http://en.wikipedia.org/wiki/List_of_uniform_tilings">more on uniform tilings</a>. So where next ?</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=20&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/06/12/pixel-bender-hexcells/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3031/2572702685_ef07461a6f.jpg" medium="image" />
	</item>
		<item>
		<title>Tube View - with pixel bender</title>
		<link>http://pixelero.wordpress.com/2008/05/21/tube-view-with-pixel-bender/</link>
		<comments>http://pixelero.wordpress.com/2008/05/21/tube-view-with-pixel-bender/#comments</comments>
		<pubDate>Wed, 21 May 2008 19:08:00 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[pixel bender]]></category>

		<category><![CDATA[demo]]></category>

		<category><![CDATA[flash 10 astro]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=19</guid>
		<description><![CDATA[
The Beta release of Flash Player 10 required! Slightly improved version of the code I wrote last winter 
&#8212;
Here&#8217;s the older version with actionscript
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.petrileskinen.fi/Actionscript/TubeView/TubeView.html"><img src="http://www.petrileskinen.fi/Actionscript/TubeView/TubeView300.jpg" alt="" /></a></p>
<p>The <a href="http://labs.adobe.com/technologies/flashplayer10/">Beta release of Flash Player 10</a> required! Slightly improved version of the <a href="http://www.petrileskinen.fi/Hydra/TubeView.hydra">code I wrote last winter</a> </p>
<p>&#8212;</p>
<p>Here&#8217;s the <a href="http://www.petrileskinen.fi/Hydra/BlueCarTubeViewed.php">older version with actionscript</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=19&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/05/21/tube-view-with-pixel-bender/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/TubeView/TubeView300.jpg" medium="image" />
	</item>
		<item>
		<title>Flash 10 - Astro available, some demos</title>
		<link>http://pixelero.wordpress.com/2008/05/17/flash-10-astro-available-some-demos/</link>
		<comments>http://pixelero.wordpress.com/2008/05/17/flash-10-astro-available-some-demos/#comments</comments>
		<pubDate>Sat, 17 May 2008 14:53:10 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[pixel bender]]></category>

		<category><![CDATA[3D]]></category>

		<category><![CDATA[astro]]></category>

		<category><![CDATA[Flash Player 10]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=18</guid>
		<description><![CDATA[The beta release of Flash Player 10, code named Astro, is now out on Adobe labs!
After download you can check out couple of simple demos I wrote using new features:

Spherical Mapping - rotating 3D globe with alpha support. This version runs in CPU, if it seems slow &#8230;

ThreePointGradient - a colorful gradient by specified three [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://labs.adobe.com/technologies/flashplayer10/">beta release of Flash Player 10</a>, code named Astro, is now out on <a href="http://labs.adobe.com">Adobe labs</a>!</p>
<p>After download you can check out couple of simple demos I wrote using new features:</p>
<p><a href="http://www.petrileskinen.fi/Actionscript/SphericalMapping/SphericalMapping.html"><img src="http://www.petrileskinen.fi/portfolio_flash/perlinSmoke/Tellus.png" border="0" alt="" /><br />
Spherical Mapping</a> - rotating 3D globe with alpha support. This version runs in CPU, if it seems slow &#8230;</p>
<p><a href="http://www.petrileskinen.fi/Actionscript/ThreePointGradient/ThreePointGradient.html"><img src="http://farm4.static.flickr.com/3200/2508338286_1f0d3a5c39.jpg" alt="" /><br />
ThreePointGradient</a> - a colorful gradient by specified three colors and points - the colorPickers are as well dragable, try moving and changing colors ( ! it&#8217;s not a build-in function of graphics API, but an example of pixel bender-shader rendering a fill &#8230; )</p>
<p>There&#8217;s not much information on the net - yet. Senocular has posted a <a href="http://senocular.com/flash/tutorials/flash10drawingapi/">tutorial of new features.</a></p>
<p>and here&#8217;s CJ&#8217;s <a href="http://cjcat.blogspot.com/2008/05/astro-shader-lightbeams.html" target="cjbrowser">demo</a> with lightbeams !</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=18&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/05/17/flash-10-astro-available-some-demos/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/portfolio_flash/perlinSmoke/Tellus.png" medium="image" />

		<media:content url="http://farm4.static.flickr.com/3200/2508338286_1f0d3a5c39.jpg" medium="image" />
	</item>
		<item>
		<title>some studies with perlinNoise &#8230;</title>
		<link>http://pixelero.wordpress.com/2008/05/07/some-studies-with-perlinnoise/</link>
		<comments>http://pixelero.wordpress.com/2008/05/07/some-studies-with-perlinnoise/#comments</comments>
		<pubDate>Wed, 07 May 2008 17:02:12 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[Adobe]]></category>

		<category><![CDATA[as3]]></category>

		<category><![CDATA[bitmapData]]></category>

		<category><![CDATA[blendmode]]></category>

		<category><![CDATA[creepy]]></category>

		<category><![CDATA[eerie]]></category>

		<category><![CDATA[haunted]]></category>

		<category><![CDATA[perlinNoise]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=17</guid>
		<description><![CDATA[It&#8217;s creepy, it&#8217;s haunted, it&#8217;s eerieNoise:

if that was scary, please join a perlinParty:

And the third one – I don&#8217;t know what it is, but it does look soft &#8230;
And some northern lights ?
And finally &#8216;Shaman&#8217;s Prayer&#8217;:

       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s creepy, it&#8217;s haunted, it&#8217;s eerieNoise:<br />
<a href="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinCreeps.html" target="Leskinen"><img src="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinCreeps.jpg" alt="" width="157" height="208" /></a></p>
<p>if that was scary, please join a perlinParty:<br />
<a href="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinParty.html" target="Petri"><img src="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinParty.jpg" alt="" /></a></p>
<p>And <a href="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinWaves.html" target="Leskinen">the third one</a> – I don&#8217;t know what it is, but it does look soft &#8230;</p>
<p>And some <a href="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinLights.html" target="AuroraBorealis">northern lights</a> ?</p>
<p>And finally &#8216;Shaman&#8217;s Prayer&#8217;:<br />
<a href="http://www.petrileskinen.fi/Actionscript/bitmapDraw/ShamansPrayer.html" target="Leskinen"><img src="http://www.petrileskinen.fi/Actionscript/bitmapDraw/shamansPrayer.jpg" alt="by Petri Leskinen" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=17&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/05/07/some-studies-with-perlinnoise/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>

		<media:content url="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinCreeps.jpg" medium="image" />

		<media:content url="http://www.petrileskinen.fi/Actionscript/bitmapDraw/perlinParty.jpg" medium="image" />

		<media:content url="http://www.petrileskinen.fi/Actionscript/bitmapDraw/shamansPrayer.jpg" medium="image">
			<media:title type="html">by Petri Leskinen</media:title>
		</media:content>
	</item>
		<item>
		<title>[literal Array][index];</title>
		<link>http://pixelero.wordpress.com/2008/04/28/arrays-with-constant-values/</link>
		<comments>http://pixelero.wordpress.com/2008/04/28/arrays-with-constant-values/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 16:39:54 +0000</pubDate>
		<dc:creator>pixelero</dc:creator>
		
		<category><![CDATA[actionscript]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[array]]></category>

		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://pixelero.wordpress.com/?p=15</guid>
		<description><![CDATA[Some simple actionscript hint for arrays:
not only can you define a new array by just writing:
 var items:Array = ["first", "second", "third"]; // = new Array(&#8221;first&#8221;,&#8221;second&#8221;,&#8221;third&#8221;);
but you can also access items on a literal array by using an index  [1,2,3] [i] ; !
If you have a limited number of cases you can replace a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some simple actionscript hint for arrays:</p>
<p>not only can you define a new array by just writing:<br />
<span style="color:#0000ff;"> var items:Array = ["first", "second", "third"];</span> // = new Array(&#8221;first&#8221;,&#8221;second&#8221;,&#8221;third&#8221;);</p>
<p>but you can also access items on a literal array by using an index  [1,2,3]<strong> [i] </strong>; !<br />
If you have a limited number of cases you can replace a function, switch or ifs with this.</p>
<p><span style="color:#0000ff;">for (var i:int=0; i&lt;3; i++) {</span><span style="color:#0000ff;"><br />
choices[i].name = ["D2", "D3", "D4"]<strong> [i] </strong>; </span>// choices[0].name= &#8220;D2&#8243; &#8230; etc<br />
<span style="color:#0000ff;">} </span></p>
<p><span style="color:#0000ff;">var dimVal:int= [ 0, 1, 4, 13, 40 ]<strong> [n] </strong>;</span> // var n:int, precounted values for function (3^n -1)/2</p>
<p><span style="color:#0000ff;">var someColor:uint = [0xFF0000, 0xFF00, 0xFF, 0xFFFF00, 0xFF00FF, 0xFFFF]<strong> [n] </strong>;</span></p>
<p>works in javascript as well:</p>
<p><span style="color:#0000ff;">var someFib = [1, 1, 2, 3, 5, 8, 13][4];<br />
alert(&#8221;some Fibonacci number: &#8220;+someFib);</span></p>
<p>If I was a teacher, I&#8217;d now give you a task to write a script converting an integer, 0&lt;i&lt;5000, to a Roman Number returned as a string &#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pixelero.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pixelero.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pixelero.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pixelero.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pixelero.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pixelero.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pixelero.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pixelero.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pixelero.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pixelero.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pixelero.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pixelero.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pixelero.wordpress.com&blog=2904630&post=15&subd=pixelero&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pixelero.wordpress.com/2008/04/28/arrays-with-constant-values/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/pixelero-128.jpg" medium="image">
			<media:title type="html">pixelero</media:title>
		</media:content>
	</item>
	</channel>
</rss>