<?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>Dirty Motherfucking Blog &#187; graffiti</title>
	<atom:link href="http://www.dirty-motherfucker.org/blog/tag/graffiti/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dirty-motherfucker.org/blog</link>
	<description>All kinds of shit</description>
	<lastBuildDate>Tue, 17 Aug 2010 18:19:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Furry Blog Logo</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 00:20:39 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[graffiti]]></category>

		<guid isPermaLink="false">http://www.dirty-motherfucker.org/blog/?p=186</guid>
		<description><![CDATA[Update: I updated the .swf files. So hopefully now those pesky Flash Player errors are gone :( Shame on me for bad coding. I had a little fun with particles in AS3 the past days. I wrote a small piece based on my Processing port framework that traces the paths of particles. The particles pick [...]]]></description>
			<content:encoded><![CDATA[<p>Update: I updated the .swf files. So hopefully now those pesky Flash Player errors are gone :( Shame on me for bad coding.</p>
<p>I had a little fun with particles in AS3 the past days. I wrote a small piece based on my Processing port framework that traces the paths of particles. The particles pick up color from a given input texture. As they move, they plot their color onto the canvas. Although i added the condition that the color is only plotted if the target pixel is darker than the particle color. This results in a nice glowing effect around the outline of the image.<br />
I built the swf files against Flash Player 10 this time. There is actually no need at all to do so, but i just couldn&#8217;t resist Vector<T>. Arrays are so dirty :(</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tracer_small_955633297"
			class="flashmovie"
			width="466"
			height="220">
	<param name="movie" value="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_small.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_small.swf"
			name="fm_tracer_small_955633297"
			width="466"
			height="220">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Here is the <a href="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_large.swf">larger version</a> with the complete blog logo. ;)</p>
<p>And here&#8217;s some source to go with it. Although it&#8217;ll hardly compile outside of the Processing Port framework ;D But since i moved servers my SVN repository isn&#8217;t publicly available anymore. So if anyone has any interest in the complete source, i&#8217;ll wrap it up and put it online ;)</p>
<p>Particle.as</p>
<pre class="brush: as3;">
package org.dirty_dirtymotherfucker.tracer {
  import flash.display.BitmapData;
  import flash.geom.Point;
  import flash.geom.Rectangle;
  import org.dirty_dirtymotherfucker.processing.*;

  public class Particle {

    public var position_x:Number;
    public var position_y:Number;
    public var direction_x:Number;
    public var direction_y:Number;
    public var color:uint;
    public var life:Number;
    public var source:BitmapData;
    public var randomSource:BitmapData;

    public function Particle( source:BitmapData, randomSource:BitmapData, sourceOffset:uint ) {
      this.source = source;
      if( Tracer.USE_PERLIN_NOISE ) {
        this.randomSource = new BitmapData( randomSource.width, 1, false );
        this.randomSource.copyPixels( randomSource, new Rectangle( 0, sourceOffset, randomSource.width, 1 ), new Point( 0, 0 ) );
      }
      birth();
    }

    public function birth( ):void {
      life        = Tracer.MAX_PARTICLE_LIFE;
      position_x  = MathHelper.randomRange( -Tracer.CANVAS_SIZE_X, Tracer.CANVAS_SIZE_X );
      position_y  = MathHelper.randomRange( -Tracer.CANVAS_SIZE_Y, Tracer.CANVAS_SIZE_Y );
      direction_x = MathHelper.randomRange( -1.0, 1.0 );
      direction_y = MathHelper.randomRange( -1.0, 1.0 );
      color       = source.getPixel32( position_x, position_y );
    }

    public function travel( source:BitmapData, canvas:BitmapData, blend:Number ):void {
      if( Tracer.USE_PERLIN_NOISE ) {
        direction_x += ( ColorHelper.getR( randomSource.getPixel( life * 10, 0 ) ) - 128 ) / 256;
        direction_y += ( ColorHelper.getG( randomSource.getPixel( life * 10, 0 ) ) - 128 ) / 256;
      } else {
        direction_x += MathHelper.randomRange( -0.1, 0.1 );
        direction_y += MathHelper.randomRange( -0.1, 0.1 );
      }

      // normalize direction
      var len:Number = Math.sqrt( direction_x * direction_x + direction_y * direction_y );
      direction_x /= len;
      direction_y /= len;

      position_x += direction_x;
      position_y += direction_y;
      life -= 0.1;
      //if( 0 == color ) life = 0;

      var sourceColor:uint = source.getPixel32( position_x, position_y );
      var canvasColor:uint = canvas.getPixel32( position_x, position_y );

      if( sourceColor != canvasColor ) {
        color = ColorHelper.blend( color, sourceColor, blend );

        var colorFit:Boolean = ColorHelper.getR( ColorHelper.toGrayScale( color ) ) &gt; ColorHelper.getR( ColorHelper.toGrayScale( canvasColor ) );
        if( 0 != ColorHelper.getA( color ) &amp;&amp; colorFit ) {
          canvas.setPixel32( position_x, position_y, ColorHelper.blend( color, canvasColor, 25 ) );
          //canvas.setPixel32( position.x, position.y, color );
        }
      }

      if( 0 &gt; position_x || position_x &gt; Tracer.CANVAS_SIZE_X || 0 &gt; position_y || position_y &gt; Tracer.CANVAS_SIZE_Y || 0 &gt;= life ) birth();
    }

  }

}
</pre>
<p>Tracer.as</p>
<pre class="brush: as3;">
package org.dirty_dirtymotherfucker.tracer {

  import flash.display.*;
  import flash.events.*;
  import flash.geom.Matrix;
  import flash.geom.Point;
  import flash.geom.Rectangle;
  import flash.net.URLLoader;
  import flash.net.URLRequest;

  import org.dirty_dirtymotherfucker.processing.*;

  /**
   * The main implementation of the Tracer project
   */
  public class Tracer extends BlogSprite {

    // Main application settings

    public static const CANVAS_BACKGROUND_COLOR:uint  = 0xFF000000;

    public static const UPDATES_PER_SECOND:uint       = 1200;

    public static const ITERATIONS_PER_UPDATE:uint    = 10;

    public static const CANVAS_SIZE_X:uint            = 466;// 840;
    public static const CANVAS_SIZE_Y:uint            = 220;

    public static const ADDITIVE_BLENDING:Boolean     = true;
    public static const SUBTRACTIVE_BLENDING:Boolean  = false;
    private static const MAX_ITERATIONS:uint          = 0;// 120 * 20;

    public static const MAX_PARTICLE_LIFE:Number      = 100;
    public static const NUM_PARTICLES:int             = 1000;

    public static const USE_PERLIN_NOISE:Boolean      = false;

    private var iterationCount:int = 0;

    private var loader:Loader;
    private var source:BitmapData;
    private var randomSeed:BitmapData;

    private var particles:Vector.&lt;Particle&gt;;

    private var blend:Number;

    public function Tracer():void {
      ColorHelper.loadPalette( );

      super( CANVAS_SIZE_X, CANVAS_SIZE_Y, CANVAS_BACKGROUND_COLOR );

      loader = new Loader();
      //loader.load( new URLRequest( &quot;map.png&quot; ) );
      loader.load( new URLRequest( &quot;http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/motherfucking.png&quot; ) );

      loader.contentLoaderInfo.addEventListener( Event.COMPLETE, drawMap );
    }

    override protected function onDraw( event:TimerEvent ):void {
      canvas.lock();
      for( var iteration:uint = 0; iteration &lt; ITERATIONS_PER_UPDATE; ++iteration ) {
        // draw
        if( null == loader.content ) break;
        for each( var particle:Particle in particles ) {
          particle.travel( source, canvas, blend );
        }

        blend += 0.06;
        if( blend &gt;= 255 ) stopApp();

        // cycle limiter
        if( MAX_ITERATIONS &gt; 0 &amp;&amp; ++iterationCount &gt; MAX_ITERATIONS ) {
          restart();
        }
      }
      canvas.unlock();

    }

    override protected function startApp( updatesPerSecond:uint = 0 ):void {
      super.startApp( UPDATES_PER_SECOND );

      particles = new Vector.&lt;Particle&gt;();

      blend = 10;

      iterationCount = 0;

      canvas.fillRect( new Rectangle( 0, 0, CANVAS_SIZE_X, CANVAS_SIZE_Y ), CANVAS_BACKGROUND_COLOR );

      initContent();
    }

    private function drawMap( e:Event ):void {
      loader.removeEventListener( Event.COMPLETE, drawMap );

      initContent();
    }

    private function initContent():void {
      if( null == loader ) return;
      source = new BitmapData( CANVAS_SIZE_X, CANVAS_SIZE_Y, true, 0x00000000 );
      var matrix:Matrix = new Matrix();
      matrix.translate( 0, CANVAS_SIZE_Y / 2 - loader.height / 2 );
      source.draw( loader, matrix );

      if( USE_PERLIN_NOISE ) {
        randomSeed = new BitmapData( MAX_PARTICLE_LIFE * 10, NUM_PARTICLES, false, 0x000000 );
        randomSeed.perlinNoise( MAX_PARTICLE_LIFE * 10, NUM_PARTICLES, 8, Math.random() * uint.MAX_VALUE, true, true, BitmapDataChannel.GREEN | BitmapDataChannel.RED, false );
      }

      for( var i:uint = 0; i &lt; NUM_PARTICLES; ++i ) {
        particles.push( new Particle( source, randomSeed, i ) );
      }

    }

  }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sketches #5</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/11/10/sketches-5/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/11/10/sketches-5/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 11:50:35 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[graffiti]]></category>
		<category><![CDATA[sketches]]></category>
		<category><![CDATA[postal]]></category>

		<guid isPermaLink="false">http://www.dirty-motherfucker.org/blog/?p=174</guid>
		<description><![CDATA[Postal sketch second round ;) I hope there&#8217;ll be more technical content again soon ;)]]></description>
			<content:encoded><![CDATA[<p>Postal sketch second round ;)</p>
<p><a title="postal.png" href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/11/postal2.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/11/postal2thumbnail.png" alt="postal2.png" /></a></p>
<p>I hope there&#8217;ll be more technical content again soon ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/11/10/sketches-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sketches #4</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/10/30/sketches-4/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/10/30/sketches-4/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 20:18:51 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[graffiti]]></category>
		<category><![CDATA[sketches]]></category>
		<category><![CDATA[postal]]></category>

		<guid isPermaLink="false">http://www.dirty-motherfucker.org/blog/?p=162</guid>
		<description><![CDATA[A small sketch i drew during a boring meeting. At least something worth to post. Hope you like it. And maybe you noticed that i re-did the theme of the blog. Thanks to Alien^PDX who inspired me to do it with the background image of his own new website. Be sure to check out his [...]]]></description>
			<content:encoded><![CDATA[<p>A small sketch i drew during a boring meeting. At least something worth to post. Hope you like it.</p>
<p><a title="postal.png" href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/10/postal.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/10/postal.thumbnail.png" alt="postal.png" /></a></p>
<p>And maybe you noticed that i re-did the theme of the blog. Thanks to <a href="http://alien.untergrund.net/">Alien^PDX</a> who inspired me to do it with the background image of his own new website. Be sure to check out his website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/10/30/sketches-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sketches #3</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/02/05/sketches-3/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/02/05/sketches-3/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 14:03:27 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[graffiti]]></category>
		<category><![CDATA[sketches]]></category>
		<category><![CDATA[ker]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/2008/02/05/sketches-3/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-04_ker.png" title="2008-02-04_ker.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-04_ker.thumbnail.png" alt="2008-02-04_ker.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/02/05/sketches-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sketches #2</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/02/04/sketches-2/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/02/04/sketches-2/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 18:34:41 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[graffiti]]></category>
		<category><![CDATA[sketches]]></category>
		<category><![CDATA[one]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/2008/02/04/sketches-2/</guid>
		<description><![CDATA[A little sketch i did on a dirty piece of paper i had on my desk for a while ;)]]></description>
			<content:encoded><![CDATA[<p>A little sketch i did on a dirty piece of paper i had on my desk for a while ;)<br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-04_one.png" title="2008-02-04_one.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-04_one.thumbnail.png" alt="2008-02-04_one.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/02/04/sketches-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sketches #1</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/02/01/sketches-1/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/02/01/sketches-1/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 17:04:13 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[graffiti]]></category>
		<category><![CDATA[sketches]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[ker]]></category>
		<category><![CDATA[soe]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/2008/02/01/sketches-1/</guid>
		<description><![CDATA[Here are a few new sketches i did while commuting to and back from work (on the train).]]></description>
			<content:encoded><![CDATA[<p>Here are a few new sketches i did while commuting to and back from work (on the train).</p>
<p><a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-01-30_core.png" title="2008-01-30_core.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-01-30_core.thumbnail.png" alt="2008-01-30_core.png" /></a> <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-01-30_ker.png" title="2008-01-30_ker.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-01-30_ker.thumbnail.png" alt="2008-01-30_ker.png" /></a> <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-01_soe.png" title="2008-02-01_soe.png"><img src="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/02/2008-02-01_soe.thumbnail.png" alt="2008-02-01_soe.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/02/01/sketches-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
