<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Algorithmist</title>
	<atom:link href="http://algorithmist.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://algorithmist.wordpress.com</link>
	<description>Programming languages come and go, but Math is eternal</description>
	<lastBuildDate>Thu, 26 Jan 2012 14:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='algorithmist.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6f31327ab807bdc45f38a67ab579208f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>The Algorithmist</title>
		<link>http://algorithmist.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://algorithmist.wordpress.com/osd.xml" title="The Algorithmist" />
	<atom:link rel='hub' href='http://algorithmist.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Arrowed Lines in Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2012/01/26/arrowed-lines-in-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2012/01/26/arrowed-lines-in-freehand-drawing-library/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 14:27:59 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Drawing]]></category>
		<category><![CDATA[Freehand]]></category>
		<category><![CDATA[Geometry]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2671</guid>
		<description><![CDATA[Drawing lines does not sound very interesting, but in addition to my own app. development, another user expressed a desire for animated arrowed lines.  So, a new two-point stroke has been added to the library.  The TwoPoint class is the base for a family of classes in which a stroke is defined only by a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2671&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Drawing lines does not sound very interesting, but in addition to my own app. development, another user expressed a desire for animated arrowed lines.  So, a new two-point stroke has been added to the library.  The TwoPoint class is the base for a family of classes in which a stroke is defined only by a starting point and the current mouse/touch point.</p>
<p>In keeping with the FDL architecture, an engine is assigned to a two-point stroke.  Two engines will be provided in the first release candidate, arrowed lines and arcs.  The start and end arrows are optional, so these engines provide a back-door to drawing lines and arcs.  Not sexy, but the existing line decorators are applicable, so it&#8217;s incredibly easy to draw dotted or dashed lines.</p>
<p>Since the point sequence to a stroke may be simulated in an animation, it&#8217;s now very easy to draw animated dashed or solid, arrowed lines.  Here is a screen shot from one of the demos.</p>
<p><a href="http://algorithmist.files.wordpress.com/2012/01/arrowedline.jpg"><img class="alignnone size-full wp-image-2672" title="arrowedline" src="http://algorithmist.files.wordpress.com/2012/01/arrowedline.jpg?w=600" alt=""   /></a></p>
<p>Injecting a new line decorator is a matter of assigning the fully qualified class name of the decorator,</p>
<p>__data.lineDecorator = &#8220;net.algorithmist.freehand.decorators.SolidLine&#8221;;</p>
<p>or</p>
<p>__data.lineDecorator = &#8220;net.algorithmist.freehand.decorators.DashedLine&#8221;;</p>
<p>then, re-assign the stroke&#8217;s data provider,</p>
<p>__stroke.data = __data;</p>
<p>There are still a couple beta slots open, so if you are interested in developing a Flex-based application (mobile or otherwise) involving freehand drawing, please contact me at theAlgorithmist [at] gmail [dot] com.  There is a small, three-figure license fee that is a one-time cost.  Beta users get free upgrades for life!</p>
<p>I&#8217;ll be posting a roadmap for the anticipated release cycle shortly, so even if you are not interested in Flex/Actionscript development, say tuned.  A subset of the Freehand Drawing Library may be coming for JS or Corona developers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2671/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2671/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2671&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2012/01/26/arrowed-lines-in-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2012/01/arrowedline.jpg" medium="image">
			<media:title type="html">arrowedline</media:title>
		</media:content>
	</item>
		<item>
		<title>Image Painting in Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2012/01/20/image-painting-in-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2012/01/20/image-painting-in-freehand-drawing-library/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 14:56:35 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Drawing]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2658</guid>
		<description><![CDATA[A bonus project is going out to all Freehand Drawing Library beta users this morning.  Currently, the library contains one fixed-width stroke with three drawing engines and three line decorators.  One question arose about how to create different strokes and the role of engines within the architecture.  I also received a comment about an iPad [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2658&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A bonus project is going out to all Freehand Drawing Library beta users this morning.  Currently, the library contains one fixed-width stroke with three drawing engines and three line decorators.  One question arose about how to create different strokes and the role of engines within the architecture.  I also received a comment about an iPad drawing app. that allowed people to &#8216;stamp&#8217; or &#8216;paint&#8217; smooth strokes with images.</p>
<p>Having an artist create any variety of cool images in Flash is a no-brainer.  The question is how to stamp that image repeatedly along a smooth stroke.  The answer provides a perfect illustration of stroke creation in the Freehand Drawing Library.  A stroke is designed based on certain desired characteristics, in this case the ability to distribute images along a smooth path.  A stroke engine (that implements IDrawingEngine) is created to match the general characteristics of a stroke.  Not all engines are compatible with all strokes, and that&#8217;s fine.</p>
<p>A StampedStroke class (implementing IFreehandDrawable, so it can be used in a Factory) was developed for the desired purpose.  A single engine, Stamp, computes the same smoothed stroke coordinates as the SmoothedStroke engine.  Since nothing is drawn into any graphics context, the concept of line decorators does not apply.  The stroke engine directly instantiates the image symbol and adds it to the display list.</p>
<p>The Stamp engine accepts a single engine parameter, &#8216;imagestamp&#8217;, which is the reference to the symbol created in Flash and exported with a base class that extends MovieClip.  Using the stroke is as simple as instantiation,</p>
<p>private var __stroke:StampedStroke  = new StampedStroke();<br />
private var __data:StrokeDataVO = new StrokeDataVO();</p>
<p>Make sure the stroke engine and symbol are compiled into the SWF,</p>
<p>import net.algorithmist.freehand.StampedStroke;<br />
import net.algorithmist.freehand.symbols.Starburst;</p>
<p>private static const STAMP_ENGINE:Class = Stamp;<br />
private static const STAR_CLASS:Class = Starburst;</p>
<p>Then, inject stroke engine and assign engine parameters,</p>
<p>__data.drawingEngine = &#8220;net.algorithmist.freehand.engine.Stamp&#8221;;<br />
__data.engineParams = {imagestamp:&#8221;net.algorithmist.freehand.symbols.Starburst&#8221;};</p>
<p>Assign the data provider for the stroke,</p>
<p>__stroke.data = __data;</p>
<p>Draw, and have fun.  The Stamp engine contains a back door to animating the stroke while it&#8217;s being drawn.  I may create an online example since it&#8217;s pretty cool <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://algorithmist.files.wordpress.com/2012/01/imgstamp.jpg"><img class="alignnone size-full wp-image-2660" title="imgStamp" src="http://algorithmist.files.wordpress.com/2012/01/imgstamp.jpg?w=600" alt=""   /></a></p>
<p>The library is currently in the final beta phase before RC1.  Because of all the new capability, I&#8217;ve opened up several beta slots.   There is a small, three-figure license fee, which is a one-time cost.  All beta testers get free upgrades for life!</p>
<p>Please contact me at theAlgorithmist [at] gmail [dot] com if interested.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2658/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2658&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2012/01/20/image-painting-in-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2012/01/imgstamp.jpg" medium="image">
			<media:title type="html">imgStamp</media:title>
		</media:content>
	</item>
		<item>
		<title>New Drawing Engines for Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2012/01/09/new-drawing-engines-for-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2012/01/09/new-drawing-engines-for-freehand-drawing-library/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:14:31 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Drawing]]></category>
		<category><![CDATA[Freehand]]></category>
		<category><![CDATA[Geometry]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2652</guid>
		<description><![CDATA[The upcoming beta for the Freehand Drawing Library now has a single constant-width stroke and three drawing engines.  The basic stroke is architected to work with any drawing engine (IDrawingEngine instance).  The StrokeDataVO contains both the fully qualified class name of the IDrawingEngine instance and an engineParams Object to pass arbitrary parameters to any drawing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2652&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The upcoming beta for the Freehand Drawing Library now has a single constant-width stroke and three drawing engines.  The basic stroke is architected to work with any drawing engine (IDrawingEngine instance).  The StrokeDataVO contains both the fully qualified class name of the IDrawingEngine instance and an engineParams Object to pass arbitrary parameters to any drawing engine.</p>
<p>The three drawing engines are</p>
<p>1 &#8211; SmoothedStroke: Constant-width equivalent of the algorithm used in the variable-width Freehand stroke.  This algorithm allows cusps or sharp angles in the stroke.</p>
<p>2 &#8211; ConstantSmoothing:  Same engine as #1 except that smoothing is constant.  Cusps are not possible.</p>
<p>3 &#8211; Lagged:  This is an experimental engine that implements lagged smoothing over a small number of prior mouse moves. The entire stroke is redrawn from scratch after every move.  This produces a variety of interesting strokes that move in a serpentine fashion while the stroke is drawn.  I think this one would be fun for a kid&#8217;s doodling application.</p>
<p>A screen shot of the lagged drawing engine is shown below.</p>
<p><a href="http://algorithmist.files.wordpress.com/2012/01/engines.jpg"><img class="alignnone size-full wp-image-2653" title="engines" src="http://algorithmist.files.wordpress.com/2012/01/engines.jpg?w=600" alt=""   /></a></p>
<p>With the current FDL architecture, all three engines can be interchanged with the same basic, constant-width stroke.  And, each drawing engine can be used with any of the three available line decorators (solid, dashed, dotted).</p>
<p>One stroke, nine different drawings <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have a few minor details to clean up and then a new beta (0.95) will be released.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2652/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2652&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2012/01/09/new-drawing-engines-for-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2012/01/engines.jpg" medium="image">
			<media:title type="html">engines</media:title>
		</media:content>
	</item>
		<item>
		<title>Dotted Line Decorator in Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2012/01/06/dotted-line-decorator-in-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2012/01/06/dotted-line-decorator-in-freehand-drawing-library/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 14:38:14 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Drawing]]></category>
		<category><![CDATA[Freehand]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2647</guid>
		<description><![CDATA[The line decorator architecture in the Freehand Drawing Library is complete, fully documented, and pretty thoroughly tested.  Here is a screenshot from the demo that shows the new dotted line decorator.  The stroke engine is the same for all strokes. Switching from solid to dashed to dotted lines is simple and the stroke engine is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2647&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The line decorator architecture in the Freehand Drawing Library is complete, fully documented, and pretty thoroughly tested.  Here is a screenshot from the demo that shows the new dotted line decorator.  The stroke engine is the same for all strokes.</p>
<p><a href="http://algorithmist.files.wordpress.com/2012/01/decorator.jpg"><img class="alignnone size-full wp-image-2648" title="decorator" src="http://algorithmist.files.wordpress.com/2012/01/decorator.jpg?w=600" alt=""   /></a></p>
<p>Switching from solid to dashed to dotted lines is simple and the stroke engine is agnostic to how the strokes are drawn.  The code for the radio button handler is provided below (comments and UI-related code are removed)</p>
<pre>switch( event.target.id )
{
  case "solid":
    __data.lineDecorator = "net.algorithmist.freehand.decorators.SolidLine";
  break;
  case "dashed":
    __data.lineDecorator = "net.algorithmist.freehand.decorators.DashedLine";
  break;
  case "dotted":
    __data.lineDecorator = "net.algorithmist.freehand.decorators.DottedLine";
  break;
}
__stroke.data = __data;</pre>
<p>The decorator classes are either pre-compiled into the app or loaded from a SWF in advance of assigning a decorator. The default solid-line decorator is always available.</p>
<p>The final demo (should be ready this weekend or early next week) will demonstrate a single line decorator with multiple stoke engines.  I&#8217;ll release another beta (in advance of the first release candidate) at that time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2647/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2647&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2012/01/06/dotted-line-decorator-in-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2012/01/decorator.jpg" medium="image">
			<media:title type="html">decorator</media:title>
		</media:content>
	</item>
		<item>
		<title>Blogging Year in Review</title>
		<link>http://algorithmist.wordpress.com/2012/01/01/blogging-year-in-review/</link>
		<comments>http://algorithmist.wordpress.com/2012/01/01/blogging-year-in-review/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 20:54:25 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2638</guid>
		<description><![CDATA[I never thought much about blog statistics over the prior year until receiving a WordPress summary.  The reflection also caused me to think hard about where I want to take this blog in the upcoming year.  So, here&#8217;s a brief look back and a brief look ahead. Over 230,000 visits to this blog were logged [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2638&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I never thought much about blog statistics over the prior year until receiving a WordPress summary.  The reflection also caused me to think hard about where I want to take this blog in the upcoming year.  So, here&#8217;s a brief look back and a brief look ahead.</p>
<p>Over 230,000 visits to this blog were logged in 2011, not very impressive as I suspect there are many top programmers who receive that many visits in one or two months.  For a blog devoted primarily to applied math with the occasional tennis diversion, I felt that was better than expected.</p>
<p>The most visitors came from the US, followed by the UK, India, South America, and Australia.</p>
<p>The top referring sites were my business site, algorithmist.net, followed by degrafa.org, Facebook, Stack Overflow, and Flashbookmarks.</p>
<p>The most traffic came from search engines and the top search terms were black mathematicians, puremvc tutorial, TRON Clock, and Prince EXO 3 Black.  Where&#8217;s my sponsorship from Prince?</p>
<p>The top two posts were from the TRON Clock demo and the top blog commenter was friend and fellow developer, PolyGeek.  I&#8217;m guessing he&#8217;ll be the first person to respond to this post <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In terms of traffic, the top four posts were Flex-related and number 5 was the <a href="http://algorithmist.wordpress.com/2010/06/12/babolat-rpm-blast-review/" target="_blank">Babolat RPM Blast review</a>.  OK, where&#8217;s my Babloat sponsorship?</p>
<p>In terms of 2012, I&#8217;ll be working a lot on the Freehand Drawing Library and app. development, so I expect personal blog posts to decline.  I&#8217;m considering guest posts as a means to keep the content fresh and give others a shot at some exposure.  So, if you are interested in writing posts on applied math or general programming/algorithm topics and have either a resume or personal site to display your background, please email me at theAlgorithmist [at] gmail.com with the subject &#8216;Guest Posting on The Algorithmist.&#8217;  All posts will contain a link to your personal site or a brief bio.</p>
<p>I&#8217;ve received a few requests to do a series on vector math and computational Geometry in Javascript.  I probably won&#8217;t be able to devote time to this until Q2, but it&#8217;s at the top of the &#8216;new topics.&#8217; list.  Please feel free to suggest other topics of interest and thanks for your visits.  Hope you found something interesting or useful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2638/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2638&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2012/01/01/blogging-year-in-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>
	</item>
		<item>
		<title>Recent Work Measuring Volume</title>
		<link>http://algorithmist.wordpress.com/2011/12/19/recent-work-measuring-volume/</link>
		<comments>http://algorithmist.wordpress.com/2011/12/19/recent-work-measuring-volume/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 15:52:21 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Volume]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2624</guid>
		<description><![CDATA[Anyone who has ever played with a chemistry set should enjoy the description of this project  This learning application teaches students how to measure the volume of regular and irregular objects by their effect on water level in a container. The application begins in an exploration mode with a layout consisting of a work area [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2624&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Anyone who has ever played with a chemistry set should enjoy the description of this project <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   This learning application teaches students how to measure the volume of regular and irregular objects by their effect on water level in a container.</p>
<p>The application begins in an exploration mode with a layout consisting of a work area and a cabinet containing objects to measure, some containers, and a few tools.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab1.jpg"><img class="alignnone size-full wp-image-2625" title="lab1" src="http://algorithmist.files.wordpress.com/2011/12/lab1.jpg?w=600" alt=""   /></a></p>
<p>Water may be added to a container from the faucet, which pours at three different rates depending on the slider position.  All water levels and animation were drawn programmatically.  After adding water, the student may drop an object into a container.  Objects may be &#8216;added&#8217; to empty containers as well.  If any part of the object overlaps a container, it is automatically added to the container.  In addition to collision detection of irregular objects, a general-purpose animation manager was written for this project.  It controlled the animation of objects dropping into containers and setting of a &#8216;critical&#8217; level, which was used to dispatch an event, from which the rise of the container&#8217;s water level was choreographed.  This allows the water level to animate in a reasonable manner and be timed to correspond with the object reaching the water level.</p>
<p>Water level rises in a physically realistic manner in that all objects have a mathematical model; box, cylinder, or spherical.  Depending on the container and object properties, water in a container may not rise by the volume of the object.  For box and cylinder models, computing the water level rise is straightforward. For spherical models, roots of a cubic polynomial must be computed.  I added a cubic root finder to this client&#8217;s math library.  Fortunately, the physics of the problem result in only one root, so resolving multiple roots in an interval was not necessary.</p>
<p>Objects are stacked behind containers by default and when the student moves a container with an object &#8216;inside&#8217; it, the object moves as well.  However, if the student clicks such that the mouse is over the object, the object is moved instead.  This is indicated by a glow filter to inform the student they are about to move the object instead of the container.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab2.jpg"><img class="alignnone size-full wp-image-2626" title="lab2" src="http://algorithmist.files.wordpress.com/2011/12/lab2.jpg?w=600" alt=""   /></a></p>
<p>Layering, however, is not static.  If an object is released in such a manner that it does not fall into a container, it is immediately layered in front of all containers.  If the same object is later dropped into another container, it is layered behind all containers.</p>
<p>Collision detection includes not only container-object collisions, but detecting when an object is positioned so that it will drop into a container and when a container is in &#8216;pouring position&#8217; above another container.  Container pouring represented the most intricate part of this application.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab3.jpg"><img class="alignnone size-full wp-image-2627" title="lab3" src="http://algorithmist.files.wordpress.com/2011/12/lab3.jpg?w=600" alt=""   /></a></p>
<p>Two models are involved in pouring, both of which were supplied by the science curricula manager responsible for this application.  The first involves computing the pouring angle as a function of the horizontal position of each container&#8217;s spout.  Given a pouring angle, the second model determines how the &#8216;side view&#8217; of water in the pouring container is drawn and how much water leaves the container.</p>
<p>This water does not immediately transfer into the destination container.  If water spills from a container in the drag handler, a Timer is initiated whose handler transfers water from a virtual &#8216;in buffer&#8217; to the destination container according to a pouring constant whose value is container-dependent.  This constant allows certain visual and interactive constraints (such as water not pouring in too fast or too slow into certain containers) to be met.  Adjustment of the water level in the destination container is physically accurate in the presence of contained objects.</p>
<p>In addition to pouring into containers, students may pour water into the sink, which is treated as a faux container for just that purpose.</p>
<p>Overflow from containers is allowed.  Certain containers are allowed to overflow into other containers, as shown below.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab4.jpg"><img class="alignnone size-full wp-image-2629" title="lab4" src="http://algorithmist.files.wordpress.com/2011/12/lab4.jpg?w=600" alt=""   /></a></p>
<p>Three tools are provided, a Ruler (for measuring object dimensions), an eyedropper (for extraction and addition of tiny amounts of water), and a magnifying glass for measuring the meniscus of water in a graduated cylinder.  The latter is dynamically drawn using a quadratic Bezier, according to properties assigned by the science curricula manager.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab5.jpg"><img class="alignnone size-full wp-image-2630" title="lab5" src="http://algorithmist.files.wordpress.com/2011/12/lab5.jpg?w=600" alt=""   /></a></p>
<p>The meniscus is shown whenever a specified interior section of the lens is over the actual meniscus in a graduated cylinder.  This test is performed inside the magnifying glass handler using a highly optimized circle-rectangle collision test.  The magnifying glass and containers may establish a two-way connection (think of it as two-way binding) so that if water is added to a graduated cylinder, the magnified meniscus view is dynamically redrawn until the meniscus is &#8216;out of view&#8217; of the lens.</p>
<p>In addition to the exploration view, the application also contains a test or practice view.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/lab6.jpg"><img class="alignnone size-full wp-image-2632" title="lab6" src="http://algorithmist.files.wordpress.com/2011/12/lab6.jpg?w=600" alt=""   /></a></p>
<p>Each problem presents students with a selected number of objects, tools, and containers, sufficient to answer the question.  Answers are deemed correct if they lie within a specified tolerance.  To create a virtually limitless number of questions from a small base, initial volumes and object parameters may be randomized in the question XML.  One example problem is</p>
<pre>&lt;question type="answer" number="9" category="all" target="Prism" textBox="true" &gt;    &lt;questionText&gt;
  &lt;![CDATA[To the nearest 0.1 cm &lt;span class='sup'&gt;&lt;font size = '+4'&gt;3&lt;/font&gt;&lt;/span&gt;, what is the volume of this rectangular prism?]]&gt;
  &lt;/questionText&gt;
  &lt;textBox&gt;
   &lt;![CDATA[cm &lt;span class='sup'&gt;&lt;font size = '+4'&gt;3&lt;/font&gt;&lt;/span&gt;]]&gt;
  &lt;/textBox&gt;
  &lt;answer tolerance="0.1" /&gt;
  &lt;containers /&gt;
  &lt;objects&gt;
    &lt;object id="Prism" x="330" y="330"&gt;
  &lt;length&gt;
    &lt;generate&gt;3.9 + 0.3*rnd()&lt;/generate&gt;
  &lt;/length&gt;
&lt;width&gt;
&lt;generate&gt;2.4+ 0.3*rnd()&lt;/generate&gt;
   &lt;/width&gt;
   &lt;height&gt;
     &lt;generate&gt;7.3 + 0.3*rnd()&lt;/generate&gt;
   &lt;/height&gt;
  &lt;/object&gt;
 &lt;/objects&gt;
 &lt;tools&gt;
  &lt;tool id="ruler" x="460" y="300" /&gt;
 &lt;/tools&gt;
&lt;/question&gt;</pre>
<p>Whenever a &lt;generate&gt; node is encountered, the parser sends the node&#8217;s contents to a specialized method that randomizes a value and generates the numerical value of the node.  That value is either in-lined into question text or used to calculate object volume.</p>
<p>So, each time the student practices in this view, they receive a the same set of questions with differing values.  The code is very efficient in the sense that the same base class for container-object interaction is used to create the two Views.  The hierarchy for lab items is DraggableItem -&gt; LabItem -&gt; Lab Object -&gt; LabContainer.</p>
<p>I suppose you can see why I&#8217;ve been so busy for the last couple months <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Going to take a few days off now before returning to work on the Freehand Drawing Library.</p>
<p>Merry Christmas and best wishes for 2012 to all readers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2624/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2624&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2011/12/19/recent-work-measuring-volume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab1.jpg" medium="image">
			<media:title type="html">lab1</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab2.jpg" medium="image">
			<media:title type="html">lab2</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab3.jpg" medium="image">
			<media:title type="html">lab3</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab4.jpg" medium="image">
			<media:title type="html">lab4</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab5.jpg" medium="image">
			<media:title type="html">lab5</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/lab6.jpg" medium="image">
			<media:title type="html">lab6</media:title>
		</media:content>
	</item>
		<item>
		<title>Function Graphing Update Part II</title>
		<link>http://algorithmist.wordpress.com/2011/12/16/function-graphing-update-part-ii/</link>
		<comments>http://algorithmist.wordpress.com/2011/12/16/function-graphing-update-part-ii/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 14:24:38 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Graphing]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2618</guid>
		<description><![CDATA[I&#8217;ve been very quiet over the last few months, and for good reason.  Just finished a gig involving two pretty complex learning applications for physical science.  I worked on one as a primary developer, and the function graphing engine I authored was used in another.  This is the first of a couple posts summarizing the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2618&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been very quiet over the last few months, and for good reason.  Just finished a gig involving two pretty complex learning applications for physical science.  I worked on one as a primary developer, and the function graphing engine I authored was used in another.  This is the first of a couple posts summarizing the work before returning to development of the Freehand Drawing Library.</p>
<p>The prior update on the function graphing engine was <a href="http://algorithmist.wordpress.com/2011/11/14/recent-work-upgrades-to-function-graphing-engine/" target="_blank">summarized in this post.</a> This particular learning application involves chemical reactions and equilibrium.  A simulation is started in one tab, as shown below.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/setup.jpg"><img class="alignnone size-full wp-image-2619" title="setup" src="http://algorithmist.files.wordpress.com/2011/12/setup.jpg?w=600" alt=""   /></a></p>
<p>Depending on the simulation length, a substantial number of molecules may interact in a single time step.  Clicking on the Graph tab shows a real-time line plot of the state of various reactions.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/graph1.jpg"><img class="alignnone size-full wp-image-2620" title="graph1" src="http://algorithmist.files.wordpress.com/2011/12/graph1.jpg?w=600" alt=""   /></a></p>
<p>The x-axis is time steps and the programmer plots the most recent N steps.</p>
<p>A new addition to the graphing engine is the ability to adjust x- and y-axis bounds and tic marks independently.  This provides highly customizable zoom capability.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/graph2.jpg"><img class="alignnone size-full wp-image-2621" title="graph2" src="http://algorithmist.files.wordpress.com/2011/12/graph2.jpg?w=600" alt=""   /></a></p>
<p>The graph may be panned by dragging, and panning is setup in XML to be restricted to the first quadrant.</p>
<p>This was a very interesting project both because I enjoyed working with the other application developer and to see a cool use of the function graphing engine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2618/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2618/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2618/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2618&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2011/12/16/function-graphing-update-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/setup.jpg" medium="image">
			<media:title type="html">setup</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/graph1.jpg" medium="image">
			<media:title type="html">graph1</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/graph2.jpg" medium="image">
			<media:title type="html">graph2</media:title>
		</media:content>
	</item>
		<item>
		<title>Dashed Line Decorator in Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2011/12/02/dashed-line-decorator-in-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2011/12/02/dashed-line-decorator-in-freehand-drawing-library/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 13:30:01 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Drawing]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2612</guid>
		<description><![CDATA[I&#8217;ve been insanely busy over the last couple months, for which I should be grateful, but at the same time a little bummed over the lack of posts.  Here&#8217;s a quick update on the new Decorator architecture in the Freehand Drawing Library. In the prior post, I mentioned that the drawing algorithm is now abstracted [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2612&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been insanely busy over the last couple months, for which I should be grateful, but at the same time a little bummed over the lack of posts.  Here&#8217;s a quick update on the new Decorator architecture in the Freehand Drawing Library.</p>
<p>In the prior post, I mentioned that the drawing algorithm is now abstracted into its own API.  A concrete implementation of any algorithm is injected into the BasicStroke class upon assigning a data provider.  Now, the drawing API itself is abstracted.  Using a Decorator pattern, it is now possible to dynamically change the line drawing style applied inside a specified drawing engine.  This completely separates the algorithm for computing the constituent points of a stroke from the line style used to draw the stroke.</p>
<p>Just like SkinnableComponents in Flex, the stroke algorithm and visual representation are now completely decoupled.  Here is a screenshot for a dashed-line Decorator.  The same smoothed-stroke algorithm for solid strokes is used in this example, except it is now agnostic to how the small line segments are drawn.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/12/dahsed.jpg"><img class="alignnone size-full wp-image-2613" title="dahsed" src="http://algorithmist.files.wordpress.com/2011/12/dahsed.jpg?w=600" alt=""   /></a></p>
<p>I&#8217;ll have some additional exciting announcements in the near future.  In the mean time, back to my gig!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2612&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2011/12/02/dashed-line-decorator-in-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/12/dahsed.jpg" medium="image">
			<media:title type="html">dahsed</media:title>
		</media:content>
	</item>
		<item>
		<title>Recent Work: Upgrades to Function Graphing Engine</title>
		<link>http://algorithmist.wordpress.com/2011/11/14/recent-work-upgrades-to-function-graphing-engine/</link>
		<comments>http://algorithmist.wordpress.com/2011/11/14/recent-work-upgrades-to-function-graphing-engine/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 14:29:33 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Graphing]]></category>
		<category><![CDATA[Functions]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2606</guid>
		<description><![CDATA[I wrote a class library for function graphing and exploration (with several complex, interactive features) years ago that uses XML for most of the graphing setup.  The library dealt with functions defined by a modest number of parameters whose values may change, but the basic functional representation is immutable. A student might explore x2 + [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2606&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote a class library for function graphing and exploration (with several complex, interactive features) years ago that uses XML for most of the graphing setup.  The library dealt with functions defined by a modest number of parameters whose values may change, but the basic functional representation is immutable.</p>
<p>A student might explore x<sup>2</sup> + 3x + 2 over a variety of intervals, or may even study ax<sup>2</sup> + bx + c, where the constants a, b, and c are interactively varied.  The function is still defined, in advance, by a small, finite number of parameters.</p>
<p>My client recently wished to use this engine to explore functions that arise from physical simulations over time.  The &#8216;function&#8217; is not mathematically defined by a  formula.   Instead, its values are sampled over time.  Data points are plotted either separately, or connected by lines.  Two new low-level functions, ScatterPlot and LinePlot were introduced into the defined functions library and new methods were added to the function graphing class to allow data that &#8216;defines&#8217; a function to be updated at runtime.  New methods to adjust the graph range and tic increments were also added.</p>
<p>The function graphing engine now supports panning restrictions by quadrant.  Many physical simulations are sampled over time intervals, so the graph x-coordinate is a time sample (always greater than or equal to zero).  For simulations whose y-axis values are positive, restricting graph panning to the first quadrant is desirable.  One or two-quadrant combination panning restrictions are now allowed in the function graph XML.</p>
<p>&lt;learningObject id=&#8221;simulationGraph&#8221; class=&#8221;display.graphing.functions.FunctionPlot&#8221; x=&#8221;35&#8243; y=&#8221;40&#8243; width=&#8221;350&#8243; height=&#8221;280&#8243; display=&#8221;f1,f2,f3&#8243; pannable=&#8221;true&#8221; <strong>restrictPan=&#8221;quadrant:1&#8243;</strong> &gt;</p>
<p>Here&#8217;s a screenshot of the engine in action,</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/11/graph.jpg"><img class="alignnone size-full wp-image-2607" title="graph" src="http://algorithmist.files.wordpress.com/2011/11/graph.jpg?w=600" alt=""   /></a></p>
<p>The modifications have been quite interesting, but would have been far more difficult without the extreme level of internal and external documentation generated for this complex class library.  Over two years went by between modifications.  So, think about the next person that comes along after your code is written.</p>
<p>It might be you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2606/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2606&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2011/11/14/recent-work-upgrades-to-function-graphing-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/11/graph.jpg" medium="image">
			<media:title type="html">graph</media:title>
		</media:content>
	</item>
		<item>
		<title>Sneak Peek of Constant-Width Strokes in Freehand Drawing Library</title>
		<link>http://algorithmist.wordpress.com/2011/11/07/sneak-peek-of-constant-width-strokes-in-freehand-drawing-library/</link>
		<comments>http://algorithmist.wordpress.com/2011/11/07/sneak-peek-of-constant-width-strokes-in-freehand-drawing-library/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 14:01:02 +0000</pubDate>
		<dc:creator>algorithmist</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Curves]]></category>
		<category><![CDATA[Strokes]]></category>

		<guid isPermaLink="false">http://algorithmist.wordpress.com/?p=2595</guid>
		<description><![CDATA[The full 1.0 release of the Freehand Drawing Library will contain classes for both fixed- and variable-wdith strokes.  The latter was the most challenging in terms of implementation, so it was the first entry into the library.  Now, my attention is turning towards constant-stroke classes. Unlike its fixed-width counterpart, I anticipate a wide variety of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2595&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The full 1.0 release of the Freehand Drawing Library will contain classes for both fixed- and variable-wdith strokes.  The latter was the most challenging in terms of implementation, so it was the first entry into the library.  Now, my attention is turning towards constant-stroke classes.</p>
<p>Unlike its fixed-width counterpart, I anticipate a wide variety of both algorithms and stroke styles to be employed with fixed-width strokes.  In order to avoid bloating the library with one class for every conceivable type of fixed-width stroke, a different architecture is used inside the library.</p>
<p>A BasicStroke class that implements IFreehandDrawable was created that serves as the constant-width counterpart to the Freehand class.  Both fixed- and variable-width stroke classes accept the same data providers.  To accommodate a wide variety of fixed-width strokes, the StrokeDataVO now contains a reference to a drawing engine of type IDrawingEngine.  The fully qualified class name of the IDrawingEngine implementation is assigned before setting the data provider for a BasicStroke.  This engine performs the actual drawing while the application interfaces with an IFreehandDrawable instance.  The application is thus agnostic to both fixed- and variable-width strokes.  A Factory may be employed to return the desired type of stroke based on input properties.</p>
<p>The basic drawing engine is based on simple line segments, i.e. point-to-point.  Although occasionally useful, this engine (net.algorithmist.freehand.engine.LineSegments) is intended to serve as a base class for other engines.  A smoothed-stroke engine is currently under development,  net.algorithmist.freehand.engine.SmoothedStroke .  It uses the same smoothing algorithm as the variable-width Freehand stroke, but without the overhead for computing the two splines used to vary stroke width.  A screen shot is shown below.</p>
<p><a href="http://algorithmist.files.wordpress.com/2011/11/cws.jpg"><img class="alignnone size-full wp-image-2596" title="cws" src="http://algorithmist.files.wordpress.com/2011/11/cws.jpg?w=600" alt=""   /></a></p>
<p>Lang Simplification, discussed in the previous post, should be useful for strokes containing a significant number of straight or nearly-straight sections, such as the rough &#8217;4&#8242; in the above example.</p>
<p>The drawing engine may be changed during runtime simply by altering the engine reference and re-assigning the stroke data provider.  The new engine is applied to all subsequently drawn strokes.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/algorithmist.wordpress.com/2595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/algorithmist.wordpress.com/2595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/algorithmist.wordpress.com/2595/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=algorithmist.wordpress.com&amp;blog=857842&amp;post=2595&amp;subd=algorithmist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://algorithmist.wordpress.com/2011/11/07/sneak-peek-of-constant-width-strokes-in-freehand-drawing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3dbb3ae20bd7175acece4154c978a77?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">algorithmist</media:title>
		</media:content>

		<media:content url="http://algorithmist.files.wordpress.com/2011/11/cws.jpg" medium="image">
			<media:title type="html">cws</media:title>
		</media:content>
	</item>
	</channel>
</rss>
