<?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>*drawlogic &#187; VISUALIZATION</title>
	<atom:link href="http://drawlogic.com/category/visualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://drawlogic.com</link>
	<description>interactive and game development technologies for the web - flash, flex, unity3d, silverlight, javascript</description>
	<lastBuildDate>Thu, 17 May 2012 13:12:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>AS3 Augmented Reality in Flash and Papervision 3D and FLARToolKit</title>
		<link>http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/</link>
		<comments>http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 20:50:29 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ALGORITHM]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[EFFECTS]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[MOTION]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PAPERVISION]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VIDEO]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[ar]]></category>
		<category><![CDATA[augmented]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[reality]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=277</guid>
		<description><![CDATA[Augmented reality is a very cool technology.  It is the star wars holograms that we always want, it is playing a game that maps out the physical world mixed with virtual assets, it is straight up cool. The FLARToolKit is doing some of this cool in Flash.  This little toolkit is pretty sweet mapping points [...]]]></description>
			<content:encoded><![CDATA[<p>Augmented reality is a very cool technology.  It is the star wars holograms that we always want, it is playing a game that maps out the physical world mixed with virtual assets, it is straight up cool.</p>
<p>The <a title="FLARToolKit" href="http://www.libspark.org/wiki/saqoosha/FLARToolKit" target="_blank">FLARToolKit</a> is doing some of this cool in Flash.  This little toolkit is pretty sweet mapping points and sets of points to patterns, colors or other visual queues that technology can latch onto.  Combine this with a webcam and you have some pretty cool AR.</p>
<p><span id="more-277"></span></p>
<p><object width="540" height="405" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=1634128&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed width="540" height="405" type="application/x-shockwave-flash" src="http://vimeo.com/moogaloop.swf?clip_id=1634128&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowfullscreen="true" allowscriptaccess="always" /></object></p>
<p><a href="http://vimeo.com/1634128">Desktop Fireworks</a> from <a href="http://vimeo.com/saqoosha">Saqoosha</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Found via <a href="http://www.todayandtomorrow.net/2008/09/01/desktop-fireworks/" target="_blank">today and tomorrow</a>:</p>
<blockquote><p>I’ve been following the development of <a title="FLARToolKit" href="http://www.libspark.org/wiki/saqoosha/FLARToolKit" target="_blank">FLARToolKit</a> for some time now and it’s getting more interesting day by day. What it is? FLARToolKit is a Flash Actionscript port of <a title="ARToolKit" href="http://www.hitl.washington.edu/artoolkit/" target="_blank">ARToolKit</a>, a software library for building Augmented Reality applications. Huh? Maybe you’ve seen some really cool <a title="Augmented Reality @ YouTube" href="http://www.youtube.com/results?search_query=augmented+reality&amp;search_type=&amp;aq=0&amp;oq=augmented+r" target="_blank">Augmented Reality videos</a> before. The FLARToolKit will bring all of this to your webbrowser when you have a webcam and a recent Flash Player.</p>
<p>This is one of the most exciting Flash things I’ve seen for a while now. <a title="Saqoosha" href="http://saqoosha.net/" target="_blank">Saqoosha</a>, a Japanese Flash developer, made this little demo: <a title="Desktop Fireworks by Saqoosha" href="http://translate.google.com/translate?hl=en&amp;sl=ja&amp;u=http://saqoosha.net/2008/08/31/1221/" target="_blank">Desktop Fireworks</a>. You will need a the Flash Player 9, a webcam and you’ll need to print out <a title="Hanabi Marker" href="http://saqoosha.net/lab/fireworks/hanabi-marker.pdf" target="_blank">this marker</a>. I’ve already did some tests together with Papervision3D and I can say we’ll probably see more of this soon. This is Flash at it’s best baby!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Google Tech Talk: Simple interactive 3D modeling for all &#8211; VideoTrace</title>
		<link>http://drawlogic.com/2008/06/21/google-tech-talk-simple-interactive-3d-modeling-for-all/</link>
		<comments>http://drawlogic.com/2008/06/21/google-tech-talk-simple-interactive-3d-modeling-for-all/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 04:02:50 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[3DSMAX]]></category>
		<category><![CDATA[ALGORITHM]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[DYNAMIC]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[INTERACTIVE]]></category>
		<category><![CDATA[INTERFACE]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VIDEO]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[real]]></category>
		<category><![CDATA[trace]]></category>
		<category><![CDATA[tracker]]></category>
		<category><![CDATA[VideoTrace]]></category>
		<category><![CDATA[virtual]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=215</guid>
		<description><![CDATA[[youtube]http://www.youtube.com/watch?v=YEM-XAeY4K0[/youtube] 3D models from basic video&#8230; This can be huge in all sorts of ways.  For exponential growth you need to go virtual. This is a technology called VideoTrace from Australia The Siggraph paper describing VideoTrace is available here (pdf 6MB) Larger videos available here, with a more compressed version here.]]></description>
			<content:encoded><![CDATA[<p>[youtube]http://www.youtube.com/watch?v=YEM-XAeY4K0[/youtube]</p>
<p>3D models from basic video&#8230; This can be huge in all sorts of ways.  For exponential growth you need to go virtual.</p>
<ul>
<li>This is a technology called <strong><a href="http://www.acvt.com.au/research/videotrace/" target="_blank">VideoTrace from Australia</a> </strong></li>
<li>The Siggraph paper describing VideoTrace is available <a href="http://www.acvt.com.au/research/videotrace/Siggraph07-van_den_hengel.pdf">here</a> <span class="linkinfo">(pdf 6MB)</span></li>
<li>Larger videos available <a href="http://www.adelaide.edu.au/static/acvt/VideoTrace2_msmpeg4v2.avi">here</a>, with a more compressed version <a href="http://www.adelaide.edu.au/static/acvt/VideoTrace2_smallmsmpeg4v2.avi">here</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/06/21/google-tech-talk-simple-interactive-3d-modeling-for-all/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.adelaide.edu.au/static/acvt/VideoTrace2_smallmsmpeg4v2.avi" length="21874598" type="video/x-msvideo" />
<enclosure url="http://www.adelaide.edu.au/static/acvt/VideoTrace2_msmpeg4v2.avi" length="79055142" type="video/x-msvideo" />
		</item>
		<item>
		<title>A Peek into the AS3 and AVM2 Virtual Machine and &#8216;Elastic Racetrack&#8217;</title>
		<link>http://drawlogic.com/2008/04/22/a-peek-into-the-as3-and-avm2-virtual-machine-and-elastic-racetrack/</link>
		<comments>http://drawlogic.com/2008/04/22/a-peek-into-the-as3-and-avm2-virtual-machine-and-elastic-racetrack/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 01:23:34 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DEBUGGING]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VIRTUAL MACHINES]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[avm]]></category>
		<category><![CDATA[avm2]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[racetrack]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[tick]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=198</guid>
		<description><![CDATA[Sean Christmann has a nice post on the AS3 AVM 2 &#8216;Elastic Racetrack&#8217; cycles or virtual machine tick that runs an ES4 based javascript version of actionscript which we all know and love. The post has some info on how the AVM2 cycles run and can provide benefits to understanding frame rates and how execution [...]]]></description>
			<content:encoded><![CDATA[<p><span class="entry-author-name"><a href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/" target="_blank">Sean Christmann has a nice post on the AS3 AVM 2 &#8216;Elastic Racetrack&#8217; cycles or virtual machine tick</a> that runs an ES4 based javascript version of actionscript which we all know and love.  The post has some info on how the AVM2 cycles run and can provide benefits to understanding frame rates and how execution is divided between script and render as well as player code from user code.</span></p>
<p><a href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/" target="_blank"><img src="http://drawk.files.wordpress.com/2008/04/elasticracetrackexport.png" alt="" /></a></p>
<p><a href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/" target="_blank"><img src="http://drawk.files.wordpress.com/2008/04/marshalledsliceexport.png" alt="" /></a></p>
<ul>
<li>Check out that and more at Craftymind like some other good stuff like <a href="http://www.craftymind.com/2008/04/09/kick-starting-the-garbage-collector-in-actionscript-3-with-air/" target="_blank">garbage collection in AIR with actionscript 3</a> (as3) and <a href="http://www.craftymind.com/2008/03/03/air-utils-saving-classes-to-disk-in-air/" target="_blank">serializing classes to files in AIR with AS3</a></li>
<li><a href="http://www.onflex.org/ted/2005/07/flash-player-mental-model-elastic.php" target="_blank">Original &#8216;Elastic Racetrack&#8217; Post by Ted on Flex in 2005</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/04/22/a-peek-into-the-as3-and-avm2-virtual-machine-and-elastic-racetrack/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Physaxe 2D Flash Physics Kit for haXe and List of Flash Flex Actionscript Physics Engines for AS3</title>
		<link>http://drawlogic.com/2008/04/06/physaxe-2d-flash-physics-kit-for-haxe-and-list-of-flash-flex-actionscript-physics-engines-for-as3/</link>
		<comments>http://drawlogic.com/2008/04/06/physaxe-2d-flash-physics-kit-for-haxe-and-list-of-flash-flex-actionscript-physics-engines-for-as3/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 06:43:06 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ALGORITHM]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DYNAMIC]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[HAXE]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PHYSICS]]></category>
		<category><![CDATA[PIXEL]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[2d]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[box2dflashas3]]></category>
		<category><![CDATA[foam]]></category>
		<category><![CDATA[glade]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[motor2]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=181</guid>
		<description><![CDATA[Nicolas Cannasse, a virtual machine genius (maker of MTASC compiler, Neko and haXe (haXe compiles to target flash 6-9 but really only flash 9 is used anymore unless you are making banners)) released the Physaxe 2D Physics kit for haXe today. It is heavily based on Glaze (demos) and Box2D which the Motor2, Glaze and [...]]]></description>
			<content:encoded><![CDATA[<p><span class="author"><a href="http://blog.haxe.org/user/1">Nicolas Cannasse</a>, </span>a virtual machine genius (maker of MTASC compiler, Neko and haXe (haXe compiles to target flash 6-9 but really only flash 9 is used anymore unless you are making banners)) <a href="http://blog.haxe.org/entry/33" target="_blank"><strong>released the Physaxe 2D Physics kit for haXe today</strong></a>.</p>
<p>It is heavily based on <a href="http://code.google.com/p/glaze/" target="_blank">Glaze</a> (<a href="http://home.planet.nl/%7Eborst595/glaze.html" target="_blank">demos</a>) and  <a href="http://www.box2d.org/" target="_blank">Box2D </a>which the <a href="http://lab.polygonal.de/motor_physics/" target="_blank">Motor2</a>, <a href="http://code.google.com/p/glaze/" target="_blank">Glaze </a>and <a href="http://box2dflash.sourceforge.net/" target="_blank">Box2DFlashAS3 </a>physics kits are all based on.  Box2D is a great C++ 2D physics engine, it is simple which lended itself to being ported to AS3 quite easily.  It is also a testament to AS3 that C++ kits are being ported into the language, not once, but many times. Also C ports like <a rel="nofollow" href="http://wiki.slembcke.net/main/published/Chipmunk">Chipmunk</a> and other signs point to ==  AS3 is of fun.</p>
<p>Physaxe is quite amazing you must see the <a href="http://blog.haxe.org/entry/33" target="_blank">demos</a> (very similar to <a href="http://home.planet.nl/%7Eborst595/glaze.html" target="_blank">Glade demos</a>), it will get the inspirational wheels turning in your idea machines.</p>
<p>2D Physics in Flash and AS3 are extremely hot and can be used for many, many things from game development to promotions to simulations to user interface or visualizations and even modeling natural systems. It is nice to have a port of Box2D and similar to glade capabilities with <a rel="nofollow" href="http://wiki.slembcke.net/main/published/Chipmunk">Chipmunk</a> like Glade has.</p>
<blockquote><p>A game and physics engine for Flash including:</p>
<ul>
<li>Rigid Body Dynamics</li>
<li>Scene management</li>
<li>Line of sight</li>
<li>User Input</li>
<li>Scrolling</li>
<li>AI</li>
</ul>
<p>Core parts of the physics solver and collision system are based on the C physics engine <a rel="nofollow" href="http://wiki.slembcke.net/main/published/Chipmunk">Chipmunk</a></p></blockquote>
<p><a href="http://blog.haxe.org/entry/33" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/physaxe1.png" alt="" width="480" height="339" /></a></p>
<p><a href="http://blog.haxe.org/entry/33" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/physaxe2.png" alt="" width="480" height="339" /></a></p>
<p><strong>Notes about Physaxe:</strong></p>
<p>Physaxe is a 2D Rigid Body Library written in haXe. It&#8217;s been highly optimized for the Flash 9 Player, with the best optimizations available.</p>
<blockquote><p>Physaxe is based on several existing physics engines, mainly :</p>
<ul>
<li><a rel="nofollow" href="http://box2d.org/">Box2D</a>, the reference open source physics engine</li>
<li><a href="http://groups.google.com/group/glaze-engine/browse_thread/thread/7f4503fda8dc2726" target="_blank">Glaze</a>, an AS3 engine which is a port of <a rel="nofollow" href="http://wiki.slembcke.net/main/published/Chipmunk">Chipmunk</a>, itself based on Box2D</li>
</ul>
<p>Physaxe features are :</p>
<ul>
<li>rigid body consisting in several shapes</li>
<li>shapes supported are circles, segments (with rounded edges) and arbitrary convex polygons</li>
<li>customizable broadphase (currently bruteforce and y-sorted list are available)</li>
<li>island resolution and sleeping (allow ~0 CPU to be spent when groups are sleeping)</li>
<li>constraint solver based on Box2D sequential impulses</li>
<li>customizable body properties, such as linear/angular friction and maximized motion</li>
</ul>
</blockquote>
<ul>
<li><a href="http://physaxe.googlecode.com/files/phxdemo.swf" target="_blank">Demo</a></li>
<li><a href="http://blog.haxe.org/entry/33" target="_blank">Post about the release</a></li>
<li><a href="http://code.google.com/p/physaxe/" target="_blank">Physaxe haXe Kit on Google Code</a></li>
</ul>
<p>Updated list of physics engines are like this:</p>
<p><strong>AS3 3D Physics Engines (Open Source)</strong><a href="http://www.cove.org/ape/index.htm"></a></p>
<ul>
<li><a href="http://seraf.mediabox.fr/wow-engine/" target="_blank">WOW-Engine</a></li>
</ul>
<p><strong>AS3 2D Physics Engines (Open Source)</strong></p>
<ul>
<li><a href="http://www.cove.org/ape/index.htm">APE (Actionscript Physics Engine)</a></li>
<li><a href="http://box2dflash.sourceforge.net/">Box2DFlashAS3</a></li>
<li><a href="http://blog.generalrelativity.org/?p=17">FOAM</a></li>
<li><a href="http://code.google.com/p/glaze/">Glaze</a></li>
<li><a href="http://lab.polygonal.de/motor_physics/">Motor2</a></li>
</ul>
<p><strong>haXe 2D Physics Engines</strong></p>
<ul>
<li><a href="http://blog.haxe.org/entry/33" target="_blank">Physaxe</a></li>
</ul>
<p>Get your game on! It is best to get them out early and often.  I need to take my own advice.</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/04/06/physaxe-2d-flash-physics-kit-for-haxe-and-list-of-flash-flex-actionscript-physics-engines-for-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TweenMax Bezier Tweening Released for AS2 and AS3 by Jack at GreenSock &#8211; And List of Animation Kits</title>
		<link>http://drawlogic.com/2008/04/06/tweenmax-bezier-tweening-released-for-as2-and-as3-by-jack-at-greensock-and-list-of-animation-kits/</link>
		<comments>http://drawlogic.com/2008/04/06/tweenmax-bezier-tweening-released-for-as2-and-as3-by-jack-at-greensock-and-list-of-animation-kits/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 09:40:45 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ANIMATION]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[INTERFACE]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[MOTION]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[animation kit]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[kits]]></category>
		<category><![CDATA[tween]]></category>
		<category><![CDATA[tweening]]></category>
		<category><![CDATA[tweens]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=179</guid>
		<description><![CDATA[TweenMax (Speed Test) has been released that adds a main feature missing from GreenSock&#8217;s offerings in tween animation libraries and kits over Tweener. That is the bezier curve tween. Tweener is very popular for use in PV3d and AS3 due to the bezier curve and Zeh&#8217;s great example that is really the base of a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.greensock.com/tweenmaxas3/" target="_blank">TweenMax</a> (<a href="http://blog.greensock.com/bezier-speed-test/" target="_blank">Speed Test</a>) has been released that adds a main feature missing from GreenSock&#8217;s offerings in tween animation libraries and kits over <a href="http://code.google.com/p/tweener/" target="_blank">Tweener</a>.  <strong>That is the bezier curve tween.</strong> Tweener is very popular for use in PV3d and AS3 due to the <a href="http://labs.zeh.com.br/blog/?p=104" target="_blank">bezier curve and  Zeh&#8217;s great example </a>that is really the base of a possible 3d editor. TweenMax now adds this and bezier tween capability for the GreenSock animation libraries.</p>
<p><a href="http://code.google.com/p/tweener/" target="_blank">Tweener </a>and <a href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLite </a>have become the micro animation kits as well as micro kits you can make with <a href="http://www.goasap.org/developers.html" target="_blank">Go base kits</a>. TweenLite, <a href="http://blog.greensock.com/tweenfilterliteas3/" target="_blank">TweenFilterLite</a> and TweenMax divided up into different kits allows it to be embedded for banners or small assets easier if you don&#8217;t need the filters or other advanced tweens (this comes into play heavily with large games and asset collections when the compiled SWF each need the library).  Tweener packs all features into one kit for simplicity. GreenSock kits are divided up for need.  The comparison together is about the same but for basic tweens TweenLite is only 2k.</p>
<p><a href="http://blog.greensock.com/bezier-speed-test/" target="_blank">Performance is one area that the kits from GreenSock have really shined</a> and since the addition of the <a href="http://blog.greensock.com/tweening-speed-test/" target="_blank">speed tests and benchmarks</a> it has become a great focus on showing how the open source kits are much better than bloated included animation calls in Flash and Flex defaults. I think all the kits have niches that they fit and Tweener and TweenLite are just very simple to use which adds alot to an animation kit success.</p>
<p><strong>List of Animation Kits for AS3 (some for AS2 as well)</strong></p>
<ul>
<li><a href="http://code.google.com/p/tweener/" target="_blank">Tweener</a></li>
<li>GreenSock
<ul>
<li><a href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLite</a></li>
<li><a href="http://blog.greensock.com/tweenfilterliteas3/" target="_blank">TweenFilterLite</a></li>
<li><a href="http://blog.greensock.com/tweenmaxas3/" target="_blank">TweenMax</a> (<a href="http://blog.greensock.com/bezier-speed-test/" target="_blank">Speed Test</a>)</li>
</ul>
</li>
<li><a href="http://www.goasap.org/developers.html" target="_blank">Go Base</a></li>
<li><a href="http://play.visualcondition.com/twease/" target="_blank">Twease</a></li>
<li><a href="http://www.uza.lt/codex/as3-easing/" target="_blank">AS3Easing</a></li>
<li><a href="http://www.alex-uhlmann.de/flash/animationpackage/" target="_blank">Animation Package</a></li>
<li><a href="http://www.boostworthy.com/blog/?p=170" target="_blank">Animation System</a></li>
</ul>
<p>If you are using the Flex of Flash default animation classes, I am sorry&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/04/06/tweenmax-bezier-tweening-released-for-as2-and-as3-by-jack-at-greensock-and-list-of-animation-kits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Real-Time Raytracing</title>
		<link>http://drawlogic.com/2008/03/22/as3-real-time-raytracing/</link>
		<comments>http://drawlogic.com/2008/03/22/as3-real-time-raytracing/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 22:36:39 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[ALGORITHM]]></category>
		<category><![CDATA[ANIMATION]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[EFFECTS]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PIXEL]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[INTERFACE]]></category>
		<category><![CDATA[raytrace]]></category>
		<category><![CDATA[render]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=172</guid>
		<description><![CDATA[Forrest Briggs throwing down with a real-time raytracer in AS3. Also a C++ OpenGL version sample on the page. Real-time pixel manipulation in flash is getting faster, but is still probably going to have to be faked in AS3, maybe AS4 will provide us per pixel speeds that Andre Michelle has been harping on since [...]]]></description>
			<content:encoded><![CDATA[<p>Forrest Briggs throwing down with a <a href="http://www.laserpirate.com/as3raytracer/" target="_blank">real-time raytracer in AS3</a>.  Also a C++ <a href="http://www.laserpirate.com/as3raytracer/" target="_blank">OpenGL version sample on the page</a>.</p>
<p>Real-time pixel manipulation in flash is getting faster, but is still probably going to have to be faked in AS3, maybe AS4 will provide us per pixel speeds that Andre Michelle has been harping on since flash 8.5. Native operations can be much faster in that area. AIF might look to change some of that but that is Flash 10.</p>
<p><a href="http://www.laserpirate.com/as3raytracer/" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/raytracer.png" height="304" width="420" /></a></p>
<p>Here is the code for the as3 raytracer.  Read more at <a href="http://www.laserpirate.com/as3raytracer/" target="_blank">laserpirate</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">package</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">display</span>.<span style="color: #660066;">Sprite</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">display</span>.<span style="color: #660066;">Bitmap</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">display</span>.<span style="color: #660066;">BitmapData</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">events</span>.<span style="color: #660066;">Event</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">utils</span>.<span style="color: #660066;">getTimer</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">events</span>.<span style="color: #660066;">MouseEvent</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">text</span>.<span style="color: #660066;">TextField</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">text</span>.<span style="color: #660066;">TextFormat</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">class</span> RayTracer <span style="color: #003366; font-weight: bold;">extends</span> Sprite
<span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">var</span> t<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">var</span> dt<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> .01<span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">var</span> frameTimeTxt<span style="color: #339933;">:</span>TextField<span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">public</span> static <span style="color: #003366; font-weight: bold;">const</span> BUFFER_WIDTH<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #CC0000;">160</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> static <span style="color: #003366; font-weight: bold;">const</span> BUFFER_HEIGHT<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #CC0000;">120</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> static <span style="color: #003366; font-weight: bold;">const</span> BUFFER_SCALEDDOWN<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #CC0000;">320</span> <span style="color: #339933;">/</span> BUFFER_WIDTH<span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">public</span> static <span style="color: #003366; font-weight: bold;">const</span> HALF_BUFFER_WIDTH<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> BUFFER_WIDTH <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> static <span style="color: #003366; font-weight: bold;">const</span> HALF_BUFFER_HEIGHT<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> BUFFER_HEIGHT <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">var</span> outputBitmapData<span style="color: #339933;">:</span>BitmapData<span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">private</span> <span style="color: #003366; font-weight: bold;">var</span> outputBitmap<span style="color: #339933;">:</span>Bitmap<span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> FOV<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereCenterX<span style="color: #339933;">:</span>Array 	<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>	<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> 		<span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereCenterY<span style="color: #339933;">:</span>Array 	<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span>.2<span style="color: #339933;">,</span>	.4<span style="color: #339933;">,</span> 		<span style="color: #CC0000;">100.5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereCenterZ<span style="color: #339933;">:</span>Array 	<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">4</span><span style="color: #339933;">,</span> 	<span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">4</span><span style="color: #339933;">,</span> 		<span style="color: #CC0000;">10</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereRadius<span style="color: #339933;">:</span>Array 	<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>.35<span style="color: #339933;">,</span> .35<span style="color: #339933;">,</span>	.25<span style="color: #339933;">,</span> 	<span style="color: #CC0000;">100</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereR<span style="color: #339933;">:</span>Array 		<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">255</span><span style="color: #339933;">,</span>	<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">20</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereG<span style="color: #339933;">:</span>Array 		<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> 	<span style="color: #CC0000;">150</span><span style="color: #339933;">,</span>	<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">20</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereB<span style="color: #339933;">:</span>Array 		<span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> 	<span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>		<span style="color: #CC0000;">255</span><span style="color: #339933;">,</span>	<span style="color: #CC0000;">20</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereReflects<span style="color: #339933;">:</span>Array <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphereReflectiveness<span style="color: #339933;">:</span>Array <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>.3<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphere2dX<span style="color: #339933;">:</span>Array <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span>sphereCenterX.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphere2dY<span style="color: #339933;">:</span>Array <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span>sphereCenterX.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> sphere2dR<span style="color: #339933;">:</span>Array <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span>sphereCenterX.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">var</span> numSpheres <span style="color: #339933;">=</span> sphereCenterX.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> skyR<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span>  <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> skyG<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span>  <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> skyB<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span>  <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> skyColor<span style="color: #339933;">:</span>int <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>skyR<span style="color: #339933;">&lt;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>skyG<span style="color: #339933;">&lt;&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #CC0000;">8</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> skyB<span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> ambientIllumination<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> .1<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> canvas<span style="color: #339933;">:</span>BlankClip<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> theta<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> mouseIsDown<span style="color: #339933;">:</span>Boolean <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> mouseDownTheta<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
 <span style="color: #003366; font-weight: bold;">var</span> mouseDownX<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">function</span> RayTracer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
 	outputBitmapData <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> BitmapData<span style="color: #009900;">&#40;</span>BUFFER_WIDTH<span style="color: #339933;">,</span> BUFFER_HEIGHT<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	outputBitmap <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Bitmap<span style="color: #009900;">&#40;</span>outputBitmapData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	addChild<span style="color: #009900;">&#40;</span>outputBitmap<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #006600; font-style: italic;">//outputBitmap.smoothing = true;</span>
&nbsp;
		outputBitmap.<span style="color: #660066;">width</span><span style="color: #339933;">=</span> <span style="color: #CC0000;">320</span><span style="color: #339933;">;</span>
 	outputBitmap.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">240</span><span style="color: #339933;">;</span>
&nbsp;
		canvas <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> BlankClip<span style="color: #339933;">;</span>
 	addChild<span style="color: #009900;">&#40;</span>canvas<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	canvas.<span style="color: #660066;">buttonMode</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
 	canvas.<span style="color: #660066;">useHandCursor</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
		frameTimeTxt <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TextField<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">defaultTextFormat</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TextFormat<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Arial&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">x</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">8</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">y</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">8</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">width</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">640</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">textColor</span> <span style="color: #339933;">=</span> 0xFFFFFF<span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">selectable</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 	addChild<span style="color: #009900;">&#40;</span>frameTimeTxt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		t <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
 	addEventListener<span style="color: #009900;">&#40;</span>Event.<span style="color: #660066;">ENTER_FRAME</span><span style="color: #339933;">,</span> update<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		canvas.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>MouseEvent.<span style="color: #660066;">MOUSE_DOWN</span><span style="color: #339933;">,</span> mouseDownHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	canvas.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>MouseEvent.<span style="color: #660066;">MOUSE_UP</span><span style="color: #339933;">,</span> mouseUpHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">function</span> mouseDownHandler<span style="color: #009900;">&#40;</span>e<span style="color: #339933;">:*</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">void</span>
 <span style="color: #009900;">&#123;</span>
 	mouseIsDown <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
 	mouseDownX <span style="color: #339933;">=</span> stage.<span style="color: #660066;">mouseX</span><span style="color: #339933;">;</span>
 	mouseDownTheta <span style="color: #339933;">=</span> theta<span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">function</span> mouseUpHandler<span style="color: #009900;">&#40;</span>e<span style="color: #339933;">:*</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">void</span>
 <span style="color: #009900;">&#123;</span>
 	mouseIsDown <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">public</span> <span style="color: #003366; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span>e<span style="color: #339933;">:*</span><span style="color: #009900;">&#41;</span>
 <span style="color: #009900;">&#123;</span>
 	<span style="color: #006600; font-style: italic;">// start frame timer and update global time</span>
 	<span style="color: #003366; font-weight: bold;">var</span> timer<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> getTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	t <span style="color: #339933;">+=</span> dt<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// handle mouse rotation</span>
 	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> mouseIsDown <span style="color: #009900;">&#41;</span> theta <span style="color: #339933;">=</span> mouseDownTheta <span style="color: #339933;">-</span> .0015 <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>stage.<span style="color: #660066;">mouseX</span> <span style="color: #339933;">-</span> mouseDownX<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	theta <span style="color: #339933;">+=</span> dt<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// do some funky animation</span>
 	sphereCenterX<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	sphereCenterZ<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">+</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		sphereCenterX<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	sphereCenterZ<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span> <span style="color: #339933;">+</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		sphereCenterX<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">4</span> <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	sphereCenterZ<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span> <span style="color: #339933;">+</span> .5<span style="color: #339933;">*</span>Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>theta<span style="color: #339933;">*</span><span style="color: #CC0000;">5</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">4</span> <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// reused variables</span>
 	<span style="color: #003366; font-weight: bold;">var</span> x<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> y<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> r<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> g<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> b<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> dx<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> dy<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> rayDirX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> rayDirY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> rayDirZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> rayDirMag<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> reflectRayDirX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectRayDirY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectRayDirZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> intersectionX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> intersectionY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> intersectionZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> reflectIntersectionX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectIntersectionY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectIntersectionZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> rayToSphereCenterX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> rayToSphereCenterY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> rayToSphereCenterZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> lengthRTSC2<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> closestApproach<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> halfCord2<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> dist<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> normalX<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> normalY<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> normalZ<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> normalMag<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> illumination<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectIllumination<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> reflectR<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectG<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectB<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// setup light dir</span>
 	<span style="color: #003366; font-weight: bold;">var</span> lightDirX<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> .3<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> lightDirY<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> lightDirZ<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>.5<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> lightDirMag<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">/</span>Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>lightDirX<span style="color: #339933;">*</span>lightDirX <span style="color: #339933;">+</span>lightDirY<span style="color: #339933;">*</span>lightDirY <span style="color: #339933;">+</span>lightDirZ<span style="color: #339933;">*</span>lightDirZ<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	lightDirX <span style="color: #339933;">*=</span> lightDirMag<span style="color: #339933;">;</span>
 	lightDirY <span style="color: #339933;">*=</span> lightDirMag<span style="color: #339933;">;</span>
 	lightDirZ <span style="color: #339933;">*=</span> lightDirMag<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// vars used to in intersection tests</span>
 	<span style="color: #003366; font-weight: bold;">var</span> closestIntersectionDist<span style="color: #339933;">:</span>Number<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> closestSphereIndex<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
 	<span style="color: #003366; font-weight: bold;">var</span> reflectClosestSphereIndex<span style="color: #339933;">:</span>int<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// compute screen space bounding circles</span>
 	<span style="color: #006600; font-style: italic;">//canvas.graphics.clear();</span>
 	<span style="color: #006600; font-style: italic;">//canvas.graphics.lineStyle(1, 0xFF0000, .25);</span>
 	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> numSpheres<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span>
 	<span style="color: #009900;">&#123;</span>
 		sphere2dX<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>BUFFER_WIDTH <span style="color: #009966; font-style: italic;">/ 2 + FOV * sphereCenterX[i] /</span> sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 		sphere2dY<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>BUFFER_HEIGHT <span style="color: #009966; font-style: italic;">/2 + FOV * sphereCenterY[i] /</span> sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 		sphere2dR<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span> <span style="color: #339933;">*</span> FOV <span style="color: #339933;">*</span> sphereRadius<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">/</span> sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 		<span style="color: #006600; font-style: italic;">//canvas.graphics.drawCircle(sphere2dX[i]*BUFFER_SCALEDDOWN, sphere2dY[i]*BUFFER_SCALEDDOWN, sphere2dR[i]*BUFFER_SCALEDDOWN);</span>
 		sphere2dR<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*=</span> sphere2dR<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// store the squared value</span>
 	<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// write to each pixel</span>
 	outputBitmapData.<span style="color: #660066;">lock</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>y <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> y <span style="color: #339933;">&lt;</span> BUFFER_HEIGHT<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>y<span style="color: #009900;">&#41;</span>
 	<span style="color: #009900;">&#123;</span>
 		<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>x <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> x <span style="color: #339933;">&lt;</span> BUFFER_WIDTH<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>x<span style="color: #009900;">&#41;</span>
 		<span style="color: #009900;">&#123;</span>
 			<span style="color: #006600; font-style: italic;">// compute ray direction</span>
 			rayDirX <span style="color: #339933;">=</span> x <span style="color: #339933;">-</span> HALF_BUFFER_WIDTH<span style="color: #339933;">;</span>
 			rayDirY <span style="color: #339933;">=</span> y <span style="color: #339933;">-</span> HALF_BUFFER_HEIGHT<span style="color: #339933;">;</span>
 			rayDirZ <span style="color: #339933;">=</span> FOV<span style="color: #339933;">;</span>
&nbsp;
				rayDirMag <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">/</span>Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>rayDirX <span style="color: #339933;">*</span> rayDirX <span style="color: #339933;">+</span> rayDirY <span style="color: #339933;">*</span> rayDirY <span style="color: #339933;">+</span>rayDirZ <span style="color: #339933;">*</span> rayDirZ<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 			rayDirX <span style="color: #339933;">*=</span> rayDirMag<span style="color: #339933;">;</span>
 			rayDirY <span style="color: #339933;">*=</span> rayDirMag<span style="color: #339933;">;</span>
 			rayDirZ <span style="color: #339933;">*=</span> rayDirMag<span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #006600; font-style: italic;">/// trace the primary ray ///</span>
 			closestIntersectionDist <span style="color: #339933;">=</span> Number.<span style="color: #660066;">POSITIVE_INFINITY</span><span style="color: #339933;">;</span>
 			closestSphereIndex <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span>
 			<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> numSpheres<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span>
 			<span style="color: #009900;">&#123;</span>
 				<span style="color: #006600; font-style: italic;">// check against screen space bounding circle</span>
 				dx <span style="color: #339933;">=</span> x <span style="color: #339933;">-</span> sphere2dX<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				dy <span style="color: #339933;">=</span> y <span style="color: #339933;">-</span> sphere2dY<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> dx <span style="color: #339933;">*</span> dx <span style="color: #339933;">+</span> dy <span style="color: #339933;">*</span> dy <span style="color: #339933;">&gt;</span> sphere2dR<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">// begin actual ray tracing if its inside the bounding circle</span>
&nbsp;
					lengthRTSC2 <span style="color: #339933;">=</span> 		sphereCenterX<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereCenterX<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span>
 									sphereCenterY<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereCenterY<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span>
 									sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
					closestApproach <span style="color: #339933;">=</span>	sphereCenterX<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> rayDirX <span style="color: #339933;">+</span>
 									sphereCenterY<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> rayDirY <span style="color: #339933;">+</span>
 									sphereCenterZ<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> rayDirZ<span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> closestApproach <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// intersection behind the origin</span>
 					<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
					halfCord2 <span style="color: #339933;">=</span> sphereRadius<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereRadius<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> lengthRTSC2 <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>closestApproach <span style="color: #339933;">*</span> closestApproach<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> halfCord2 <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// ray misses the sphere</span>
 					<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">// ray hits the sphere</span>
 				dist <span style="color: #339933;">=</span> closestApproach <span style="color: #339933;">-</span> Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>halfCord2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> dist <span style="color: #339933;">&lt;</span> closestIntersectionDist <span style="color: #009900;">&#41;</span>
 				<span style="color: #009900;">&#123;</span>
 					closestIntersectionDist <span style="color: #339933;">=</span> dist<span style="color: #339933;">;</span>
 					closestSphereIndex<span style="color: #339933;">=</span>i<span style="color: #339933;">;</span>
 				<span style="color: #009900;">&#125;</span>
 			<span style="color: #009900;">&#125;</span>
 			<span style="color: #006600; font-style: italic;">/// end of trace primary ray ///</span>
&nbsp;
				<span style="color: #006600; font-style: italic;">// primary ray doesn't hit anything</span>
 			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> closestSphereIndex <span style="color: #339933;">==</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
 			<span style="color: #009900;">&#123;</span>
 				outputBitmapData.<span style="color: #660066;">setPixel</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span> y<span style="color: #339933;">,</span> skyColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 			<span style="color: #009900;">&#125;</span>
 			<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #006600; font-style: italic;">// primary ray hits a sphere.. calculate shading, shadow and reflection</span>
 			<span style="color: #009900;">&#123;</span>
 				<span style="color: #006600; font-style: italic;">// location of ray-sphere intersection</span>
 				intersectionX <span style="color: #339933;">=</span> rayDirX <span style="color: #339933;">*</span> closestIntersectionDist<span style="color: #339933;">;</span>
 				intersectionY <span style="color: #339933;">=</span> rayDirY <span style="color: #339933;">*</span> closestIntersectionDist<span style="color: #339933;">;</span>
 				intersectionZ <span style="color: #339933;">=</span> rayDirZ <span style="color: #339933;">*</span> closestIntersectionDist<span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">// sphere normal at intersection point</span>
 				normalX <span style="color: #339933;">=</span> intersectionX <span style="color: #339933;">-</span> sphereCenterX<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				normalY <span style="color: #339933;">=</span> intersectionY <span style="color: #339933;">-</span> sphereCenterY<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				normalZ <span style="color: #339933;">=</span> intersectionZ <span style="color: #339933;">-</span> sphereCenterZ<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				normalX <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// could be multiply by precacluated 1/rad</span>
 				normalY <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 				normalZ <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">// diffuse illumination coef</span>
 				illumination <span style="color: #339933;">=</span> 	normalX <span style="color: #339933;">*</span> lightDirX <span style="color: #339933;">+</span>
 								normalY <span style="color: #339933;">*</span> lightDirY <span style="color: #339933;">+</span>
 								normalZ <span style="color: #339933;">*</span> lightDirZ<span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> illumination <span style="color: #339933;">&lt;</span> ambientIllumination <span style="color: #009900;">&#41;</span>
 					illumination <span style="color: #339933;">=</span> ambientIllumination<span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">/// trace a shadow ray ///</span>
 				<span style="color: #003366; font-weight: bold;">var</span> isInShadow<span style="color: #339933;">:</span>Boolean <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 				<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> numSpheres<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>j<span style="color: #009900;">&#41;</span>
 				<span style="color: #009900;">&#123;</span>
 					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> j <span style="color: #339933;">==</span> closestSphereIndex <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
						rayToSphereCenterX <span style="color: #339933;">=</span> sphereCenterX<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionX<span style="color: #339933;">;</span>
 					rayToSphereCenterY <span style="color: #339933;">=</span> sphereCenterY<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionY<span style="color: #339933;">;</span>
 					rayToSphereCenterZ <span style="color: #339933;">=</span> sphereCenterZ<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionZ<span style="color: #339933;">;</span>
&nbsp;
						lengthRTSC2 <span style="color: #339933;">=</span> 		rayToSphereCenterX <span style="color: #339933;">*</span> rayToSphereCenterX <span style="color: #339933;">+</span>
 										rayToSphereCenterY <span style="color: #339933;">*</span> rayToSphereCenterY <span style="color: #339933;">+</span>
 										rayToSphereCenterZ <span style="color: #339933;">*</span> rayToSphereCenterZ<span style="color: #339933;">;</span>
&nbsp;
						closestApproach <span style="color: #339933;">=</span>	rayToSphereCenterX <span style="color: #339933;">*</span> lightDirX <span style="color: #339933;">+</span>
 										rayToSphereCenterY <span style="color: #339933;">*</span> lightDirY <span style="color: #339933;">+</span>
 										rayToSphereCenterZ <span style="color: #339933;">*</span> lightDirZ<span style="color: #339933;">;</span>
 					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> closestApproach <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// intersection behind the origin</span>
 						<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
						halfCord2 <span style="color: #339933;">=</span> sphereRadius<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereRadius<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> lengthRTSC2 <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>closestApproach <span style="color: #339933;">*</span> closestApproach<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> halfCord2 <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// ray misses the sphere</span>
 						<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
						isInShadow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
 					<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #009900;">&#125;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">/// end of shadow ray ///</span>
&nbsp;
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> isInShadow <span style="color: #009900;">&#41;</span> illumination <span style="color: #339933;">*=</span> .5<span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #006600; font-style: italic;">/// trace reflected ray ///</span>
 				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> sphereReflects<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
 				<span style="color: #009900;">&#123;</span>
 					<span style="color: #006600; font-style: italic;">// calculate reflected ray direction</span>
 					<span style="color: #003366; font-weight: bold;">var</span> reflectCoef<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>rayDirX <span style="color: #339933;">*</span> normalX <span style="color: #339933;">+</span> rayDirY <span style="color: #339933;">*</span> normalY <span style="color: #339933;">+</span> rayDirZ <span style="color: #339933;">*</span> normalZ<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					reflectRayDirX <span style="color: #339933;">=</span> rayDirX <span style="color: #339933;">-</span> normalX <span style="color: #339933;">*</span> reflectCoef<span style="color: #339933;">;</span>
 					reflectRayDirY <span style="color: #339933;">=</span> rayDirY <span style="color: #339933;">-</span> normalY <span style="color: #339933;">*</span> reflectCoef<span style="color: #339933;">;</span>
 					reflectRayDirZ <span style="color: #339933;">=</span> rayDirZ <span style="color: #339933;">-</span> normalZ <span style="color: #339933;">*</span> reflectCoef<span style="color: #339933;">;</span>
&nbsp;
						closestIntersectionDist <span style="color: #339933;">=</span> Number.<span style="color: #660066;">POSITIVE_INFINITY</span><span style="color: #339933;">;</span>
 					reflectClosestSphereIndex <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span>
 					<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> numSpheres<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>j<span style="color: #009900;">&#41;</span>
 					<span style="color: #009900;">&#123;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> j <span style="color: #339933;">==</span> closestSphereIndex <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
							rayToSphereCenterX <span style="color: #339933;">=</span> sphereCenterX<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionX<span style="color: #339933;">;</span>
 						rayToSphereCenterY <span style="color: #339933;">=</span> sphereCenterY<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionY<span style="color: #339933;">;</span>
 						rayToSphereCenterZ <span style="color: #339933;">=</span> sphereCenterZ<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> intersectionZ<span style="color: #339933;">;</span>
&nbsp;
							lengthRTSC2 <span style="color: #339933;">=</span> 		rayToSphereCenterX <span style="color: #339933;">*</span> rayToSphereCenterX <span style="color: #339933;">+</span>
 											rayToSphereCenterY <span style="color: #339933;">*</span> rayToSphereCenterY <span style="color: #339933;">+</span>
 											rayToSphereCenterZ <span style="color: #339933;">*</span> rayToSphereCenterZ<span style="color: #339933;">;</span>
&nbsp;
							closestApproach <span style="color: #339933;">=</span> 	rayToSphereCenterX <span style="color: #339933;">*</span> reflectRayDirX <span style="color: #339933;">+</span>
 											rayToSphereCenterY <span style="color: #339933;">*</span> reflectRayDirY <span style="color: #339933;">+</span>
 											rayToSphereCenterZ <span style="color: #339933;">*</span> reflectRayDirZ<span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> closestApproach <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// intersection behind the origin</span>
 							<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
							halfCord2 <span style="color: #339933;">=</span> sphereRadius<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> sphereRadius<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> lengthRTSC2 <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>closestApproach <span style="color: #339933;">*</span> closestApproach<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> halfCord2 <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// ray misses the sphere</span>
 							<span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #006600; font-style: italic;">// ray hits the sphere</span>
 						dist <span style="color: #339933;">=</span> closestApproach <span style="color: #339933;">-</span> Math.<span style="color: #660066;">sqrt</span><span style="color: #009900;">&#40;</span>halfCord2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> dist <span style="color: #339933;">&lt;</span> closestIntersectionDist <span style="color: #009900;">&#41;</span>
 						<span style="color: #009900;">&#123;</span>
 							closestIntersectionDist <span style="color: #339933;">=</span> dist<span style="color: #339933;">;</span>
 							reflectClosestSphereIndex<span style="color: #339933;">=</span>j<span style="color: #339933;">;</span>
 						<span style="color: #009900;">&#125;</span>
 					<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// end loop through spheres for reflect ray</span>
&nbsp;
						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> reflectClosestSphereIndex <span style="color: #339933;">==</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// reflected ray misses</span>
 					<span style="color: #009900;">&#123;</span>
 						r <span style="color: #339933;">=</span> sphereR<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
 						g <span style="color: #339933;">=</span> sphereG<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
 						b <span style="color: #339933;">=</span> sphereB<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #009900;">&#125;</span>
 					<span style="color: #000066; font-weight: bold;">else</span>
 					<span style="color: #009900;">&#123;</span>
 						<span style="color: #006600; font-style: italic;">//trace(&quot;ref hit&quot;);</span>
 						<span style="color: #006600; font-style: italic;">// location of ray-sphere intersection</span>
 						reflectIntersectionX <span style="color: #339933;">=</span> reflectRayDirX <span style="color: #339933;">*</span> closestIntersectionDist <span style="color: #339933;">+</span> intersectionX<span style="color: #339933;">;</span>
 						reflectIntersectionY <span style="color: #339933;">=</span> reflectRayDirY <span style="color: #339933;">*</span> closestIntersectionDist <span style="color: #339933;">+</span> intersectionY<span style="color: #339933;">;</span>
 						reflectIntersectionZ <span style="color: #339933;">=</span> reflectRayDirZ <span style="color: #339933;">*</span> closestIntersectionDist <span style="color: #339933;">+</span> intersectionZ<span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #006600; font-style: italic;">// sphere normal at intersection point</span>
 						normalX <span style="color: #339933;">=</span> reflectIntersectionX <span style="color: #339933;">-</span> sphereCenterX<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 						normalY <span style="color: #339933;">=</span> reflectIntersectionY <span style="color: #339933;">-</span> sphereCenterY<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 						normalZ <span style="color: #339933;">=</span> reflectIntersectionZ <span style="color: #339933;">-</span> sphereCenterZ<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
							normalX <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// could be multiply by precacluated 1/rad</span>
 						normalY <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 						normalZ <span style="color: #339933;">/=</span> sphereRadius<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #006600; font-style: italic;">// diffuse illumination coef</span>
 						reflectIllumination <span style="color: #339933;">=</span> 	normalX <span style="color: #339933;">*</span> lightDirX <span style="color: #339933;">+</span>
 												normalY <span style="color: #339933;">*</span> lightDirY <span style="color: #339933;">+</span>
 												normalZ <span style="color: #339933;">*</span> lightDirZ<span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> reflectIllumination <span style="color: #339933;">&lt;</span> ambientIllumination <span style="color: #009900;">&#41;</span>
 							reflectIllumination <span style="color: #339933;">=</span> ambientIllumination<span style="color: #339933;">;</span>
&nbsp;
							r <span style="color: #339933;">=</span> sphereR<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination <span style="color: #339933;">+</span> .5 <span style="color: #339933;">*</span> sphereR<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> reflectIllumination<span style="color: #339933;">;</span>
 						g <span style="color: #339933;">=</span> sphereG<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination <span style="color: #339933;">+</span> .5 <span style="color: #339933;">*</span> sphereG<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> reflectIllumination<span style="color: #339933;">;</span>
 						b <span style="color: #339933;">=</span> sphereB<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination <span style="color: #339933;">+</span> .5 <span style="color: #339933;">*</span> sphereB<span style="color: #009900;">&#91;</span>reflectClosestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> reflectIllumination<span style="color: #339933;">;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> r <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">255</span> <span style="color: #009900;">&#41;</span> r <span style="color: #339933;">=</span> <span style="color: #CC0000;">255</span><span style="color: #339933;">;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> g <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">255</span> <span style="color: #009900;">&#41;</span> g <span style="color: #339933;">=</span> <span style="color: #CC0000;">255</span><span style="color: #339933;">;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> b <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">255</span> <span style="color: #009900;">&#41;</span> b <span style="color: #339933;">=</span> <span style="color: #CC0000;">255</span><span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #009900;">&#125;</span>  <span style="color: #006600; font-style: italic;">// end if reflected ray hits</span>
&nbsp;
					<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">/// end if reflects</span>
 				<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #006600; font-style: italic;">// primary ray doesn't reflect</span>
 				<span style="color: #009900;">&#123;</span>
 					r <span style="color: #339933;">=</span> sphereR<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
 					g <span style="color: #339933;">=</span> sphereG<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
 					b <span style="color: #339933;">=</span> sphereB<span style="color: #009900;">&#91;</span>closestSphereIndex<span style="color: #009900;">&#93;</span> <span style="color: #339933;">*</span> illumination<span style="color: #339933;">;</span>
 				<span style="color: #009900;">&#125;</span>
&nbsp;
					outputBitmapData.<span style="color: #660066;">setPixel</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span> y<span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span>r<span style="color: #339933;">&lt;&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>g<span style="color: #339933;">&lt;&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #CC0000;">8</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> b<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// end if primary ray hit</span>
 		<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// end x loop</span>
 	<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// end y loop</span>
 	outputBitmapData.<span style="color: #660066;">unlock</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// compute FPS</span>
 	<span style="color: #003366; font-weight: bold;">var</span> fps<span style="color: #339933;">:</span>Number <span style="color: #339933;">=</span> <span style="color: #CC0000;">1.0</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>getTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> timer<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">1000.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	frameTimeTxt.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Drag to rotate. FPS: &quot;</span> <span style="color: #339933;">+</span> int<span style="color: #009900;">&#40;</span>fps<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/03/22/as3-real-time-raytracing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Water Effects in Papervision 3D, Away3D and Sandy3D</title>
		<link>http://drawlogic.com/2008/03/21/papervision-3d-water-effects/</link>
		<comments>http://drawlogic.com/2008/03/21/papervision-3d-water-effects/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 08:47:07 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AWAY3D]]></category>
		<category><![CDATA[EFFECTS]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[MOTION]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PAPERVISION]]></category>
		<category><![CDATA[PIXEL]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[sandy3d]]></category>
		<category><![CDATA[water]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=171</guid>
		<description><![CDATA[I was messing with water effects and Perlin Noise (sandy3d) and some other stuff and collected some water effects and simulations that are fluid like for research, a snapshot of the state of fluid and water effects in 3d in flash. Ralph Hauwert, of course one of the original pv3d team members, posted some great [...]]]></description>
			<content:encoded><![CDATA[<p>I was messing with <a href="http://drawlogic.com/2007/07/15/3d-flash-perlin-noise-terrains-with-as3-and-sandy/" target="_blank">water effects and Perlin Noise (sandy3d)</a> and some other stuff and collected some water effects and simulations that are fluid like for research, a snapshot of the state of fluid and water effects in 3d in flash.</p>
<p><a href="http://www.unitzeroone.com/blog/2008/03/19/papervision3d-water-simulation-waterballs/" target="_blank">Ralph Hauwert</a>, of course one of the original pv3d team members, <a href="http://www.unitzeroone.com/blog/2008/03/19/papervision3d-water-simulation-waterballs/" target="_blank">posted some great samples on water effects on 3d objects in Papervision 3D</a>.  Of course the papervision list spawned this discussion from <a href="http://exey.ru/blog/home/fluid-simulation-pv3d-and-away3d" target="_blank">another great post on water simulation in papervision and away3d</a> by <a href="http://exey.ru/blog/home/fluid-simulation-pv3d-and-away3d" title="Exey's blog" target="_blank">Exey Panteleev</a>  .</p>
<p>Also, some other water like effects from Fabrice Closier and the notorious <a href="http://mrdoob.com/#/67/" target="_blank">mrdoob</a>.</p>
<p><b>Ralph&#8217;s Water Effect Demos:</b></p>
<ul>
<li><a href="http://www.unitzeroone.com/papervision/waterBump/bin-release/WaterBall.swf" title="Waterball_1" target="_blank">Water Ball Experiment 1</a></li>
</ul>
<p><a href="http://www.unitzeroone.com/papervision/waterBump/bin-release/WaterBall.swf" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/aguaballs.png" height="342" width="358" /></a></p>
<ul>
<li><a href="http://www.unitzeroone.com/papervision/waterBall2/bin-release/WaterBall.swf" title="Waterball_2" target="_blank">Water Ball 2(cpu burner alert!)</a></li>
</ul>
<p><a href="http://www.unitzeroone.com/papervision/waterBall2/bin-release/WaterBall.swf" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/aguaballs2.png" height="342" width="358" /></a></p>
<p>Hey look, the water ball is smiling at you.</p>
<p><b>Exey Panteleev&#8217;s Water Simulation:</b></p>
<ul>
<li><a href="http://exey.ru/blog/fluidsimulationPV3D/index.html" target="_blank">PV3D Simulation</a>  [<a href="http://exey.ru/blog/home/fluid-simulation-pv3d-and-away3d" target="_blank">source</a>]</li>
<li><a href="http://exey.ru/blog/fluidsimulationAway3D/index.html" target="_blank">Away3D Simulation</a> [<a href="http://exey.ru/blog/fluidsimulationAway3D/Fluid2.as" target="_blank">source</a>]</li>
</ul>
<p><a href="http://exey.ru/blog/fluidsimulationPV3D/index.html" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/water.png" height="197" width="420" /></a></p>
<p><b>Some other Water Like Fluid Effects:</b></p>
<ul>
<li><a href="http://mrdoob.com/#/67/" target="_blank">mrdoob fluid visualisation </a>effect (like wata)</li>
</ul>
<p><a href="http://mrdoob.com/#/67/" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/doob-1.png" height="346" width="420" /></a></p>
<ul>
<li><a href="http://away3d.com/away3d-temple-version-194-released" target="_blank">away3d temple fabrice</a></li>
</ul>
<p><a href="http://away3d.com/away3d-temple-version-194-released" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/fabrice.png" height="346" width="420" /></a></p>
<p>Water is hard in flash.  Fluid dynamics will probably have to be cheated but it is still looking pretty good.  The amount of processor usage depends on how real you want it to look.</p>
<p>If you are looking to make some agua, with x, the y AND the z in Flash or Flex, these are a good place to start.</p>
<p><a href="http://away3d.com/away3d-temple-version-194-released" target="_blank"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/03/21/papervision-3d-water-effects/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Degrafa for Flex Looking Pretty Sweet (AS3 and Commonizing Paths Graphics Pipeline for Silverlight and Flex)</title>
		<link>http://drawlogic.com/2008/01/14/degrafa-for-flex-looking-pretty-sweet-as3-and-commonizing-paths-graphics-pipeline-for-silverlight-and-flex/</link>
		<comments>http://drawlogic.com/2008/01/14/degrafa-for-flex-looking-pretty-sweet-as3-and-commonizing-paths-graphics-pipeline-for-silverlight-and-flex/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 08:38:14 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[INTERFACE]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[SILVERLIGHT]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[TOOLS]]></category>
		<category><![CDATA[VECTOR]]></category>
		<category><![CDATA[VISUALIZATION]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://drawlogic.com/2008/01/14/degrafa-for-flex-looking-pretty-sweet-as3-and-commonizing-paths-graphics-pipeline-for-silverlight-and-flex/</guid>
		<description><![CDATA[Just recently through the holidays Degrafa has made some great strides as a very cool SVG pathing and designers toolkit for Flex. I have to say some recent Flex apps have really looked good like Picnik and Buzzword but this kit looks to clean up the lack of design and default style-itis that has plagued [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.degrafa.com/2008/01/04/degrafa-source-now-available/" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/degrafa-code-banner.jpg" border="0" height="103" width="370" /></a><br />
<b>Just recently through the holidays <a href="http://www.degrafa.com/2008/01/04/degrafa-source-now-available/" target="_blank">Degrafa </a>has made some great strides as a very cool SVG pathing and designers toolkit for Flex. </b> I have to say some recent Flex apps have really looked good like <a href="http://www.picnik.com/" target="_blank">Picnik </a>and <a href="http://www.buzzword.com/" target="_blank">Buzzword </a>but this kit looks to clean up the lack of design and default style-itis that has plagued most common Flex Apps.</p>
<p>This so far looking like a pretty strong kit for bringing the designer pipeline into Flex to provide some really nice looking web styled apps.  It has a direct crossover to Silverlight and <a href="http://msdn2.microsoft.com/en-us/library/bb980064.aspx" target="_blank">Path </a>objects that are largely just a series of data created in Expression or exported from <a href="http://blogs.msdn.com/mswanson/archive/2005/07/12/438178.aspx" target="_blank">Illustrator into XAML</a>. The one benefit of Flex/Flash is it compiles to a very small SWF where with <a href="http://drawlogic.com/2007/09/20/silverlight-preloader-with-downloader/" target="_blank">Silverlight you have to package the XAML in a zip and use the downloader object to extract it out</a>.  These XAML files and Paths can get massive as I am sure the ones for Degrafa will for Flex but the compile option is nice as it is compressed heavily.</p>
<p><b>All about Degrafa </b></p>
<ul>
<li><a href="http://samples.degrafa.com/" target="_blank">Degrafa Samples</a></li>
<li><a href="http://code.google.com/p/degrafa/" target="_blank">Degrafa at Google Code<br />
</a></li>
<li><a href="http://www.degrafa.com/2008/01/04/degrafa-source-now-available/" target="_blank">Announcement of Code Availability (1/4/08)</a></li>
</ul>
<p>Yes the launch includes shiny buttons&#8230;<br />
<a href="http://samples.degrafa.com/SphereSkinSample/SphereSkinSample.html" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/sphere-skin-sample.jpg" border="0" height="140" width="140" /></a><br />
<a href="http://samples.degrafa.com/SphereSkinSample/SphereSkinSample.html" target="_blank">Sphere Sample (right click for source)</a></p>
<p>Also, it appears it is a way to bridge the pathing and pipeline for flash or Silverlight.  <a href="http://pavanpodila.spaces.live.com/blog/cns!9C9E888164859398!637.entry" target="_blank">At one of the contributors blogs they mention this</a>:</p>
<blockquote><p><span>We have lot of interesting features planned for the coming releases. There is also a converter app that will be made available for converting the juicy Degrafa graphics to XAML.  </span></p></blockquote>
<p>Degrafa has gone live.</p>
<p>Developing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/01/14/degrafa-for-flex-looking-pretty-sweet-as3-and-commonizing-paths-graphics-pipeline-for-silverlight-and-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Papervision3D 2.0 and 2D BitmapData Effects are Evolving</title>
		<link>http://drawlogic.com/2007/11/22/as3-papervision3d-20-and-effect-evolving/</link>
		<comments>http://drawlogic.com/2007/11/22/as3-papervision3d-20-and-effect-evolving/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 19:12:58 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[ALGORITHM]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[DRAWING]]></category>
		<category><![CDATA[EFFECTS]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PAPERVISION]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PIXEL]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VISUALIZATION]]></category>

		<guid isPermaLink="false">http://drawlogic.com/2007/11/22/as3-papervision3d-20-and-effect-evolving/</guid>
		<description><![CDATA[Andy Zupko is probably doing some of the coolest / useful work in performance and possible effects combining 2D and 3D. Using 2D BitmapData and papervision 3D it turns out you can create a parallel dimension of coolness that cannot fully exist by themselves. Papervision 2.0 with these effects and if it is as pluggable [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://blog.zupko.info/" target="_blank">Andy Zupko</a></strong> is probably <a href="http://blog.zupko.info/?p=69" target="_blank">doing some of the coolest / useful work in performance and possible effects <strong>combining 2D and 3D</strong></a>.  Using 2D BitmapData and papervision 3D it turns out you can create a <a href="http://blog.zupko.info/?p=54" target="_blank">parallel dimension of coolness</a> that cannot fully exist by themselves.</p>
<p><a href="http://blog.zupko.info/?p=69" target="_blank"></a></p>
<p style="text-align:center;"><a href="http://blog.zupko.info/?p=69" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/zupkopv3d.png" border="0" height="402" width="400" /> </a></p>
<p align="left"><strong>Papervision 2.0 with these effects and if it is as pluggable as it seems is very good for games that lighting is a key component or effects. </strong> Imagine a game that can customize weapons with 2d effects in 3d, or rocket boosters, or fireworks or all kinds of inspiring things like changing the mood or environment such as fog, lighting etc&#8230; If you start taling about adding physics to all this it just gets too fun. Effects have always been there and around, but making this possible to have a semi-standard way to do this and if it is pluggable, this can lead to many engine advancements.</p>
<p align="left"> I think the PV3d team additions of Tim Knip and Andy Zupko have been very good and zupko era in PV3d has begun. Tim Knip is also very active and helping to really organize the ascollada formats and performance stuff like only drawing what is on screen.</p>
<p align="left">Who needs Hydra now? j/k although having this now in papervision leads me to see a very fun 2008 ahead for Flash, it is also, if as pluggable as it seems, a bit like a shaders kit.</p>
<p align="left">All those older great 2d effects merging into 3d from the good old days (some still going very strong) of praystation, <a href="http://yugop.com/" target="_blank">yugop</a>, <a href="http://www.levitated.net/" target="_blank">levitated</a>, <a href="http://www.neave.com/" target="_blank">neave </a>(great 2d tv effects in <a href="http://www.neave.tv/" target="_blank">neave.tv</a>) , <a href="http://www.flight404.com/blog/" target="_blank">flight404 </a>(moved to processing) and many others.  And a new era of <a href="http://blog.zupko.info/" target="_blank">zupko [pv3d]</a>, <a href="http://mrdoob.com/" target="_blank">mr. doob</a>, <a href="http://unitzeroone.com/blog/" target="_blank">unitzeroone [pv3d]</a>, <a href="http://www.closier.nl/blog/" target="_blank">fabrice</a> [away3d] and many more a new 2d effects in 3d platform is emerging. This kit for papervision3d by zupko and Hydra is making the future glowing full of bright points, and lots of effect explosions.</p>
<p align="left"><strong> Let&#8217;s hope papervision3d 2.0 it is released soon and it has zupko&#8217;s effects code in there.</strong></p>
<p align="left">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2007/11/22/as3-papervision3d-20-and-effect-evolving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New AS3 2D Physics Engine Box2DFlashAS3 Based on Box2D for C++</title>
		<link>http://drawlogic.com/2007/11/18/new-as3-2d-physics-engine-box2dflashas3-based-on-box2d-for-c/</link>
		<comments>http://drawlogic.com/2007/11/18/new-as3-2d-physics-engine-box2dflashas3-based-on-box2d-for-c/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 02:11:40 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ANIMATION]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BEST OF]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[MOTION]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PHYSICS]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[TOOLS]]></category>
		<category><![CDATA[VISUALIZATION]]></category>

		<guid isPermaLink="false">http://drawlogic.com/2007/11/18/new-as3-2d-physics-engine-box2dflashas3-based-on-box2d-for-c/</guid>
		<description><![CDATA[Another great new 2D physics engine for AS3 has been released called Box2dFlashAS3 that is based on the excellent kit Box2D for C++. It has been a busy year for physics engines in AS3. FOAM was released this month, APE, the highly anticipated Motor Physics from polygonal labs and plenty more still I am sure. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://box2dflash.sourceforge.net/" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/icon.gif" align="right" border="0" height="76" width="86" /></a>Another great <strong><a href="http://box2dflash.sourceforge.net/" target="_blank">new 2D physics engine for AS3</a></strong> has been released called <strong><a href="http://box2dflash.sourceforge.net/" target="_blank">Box2dFlashAS3</a></strong> that is based on the excellent kit <a href="http://www.box2d.org/" target="_blank">Box2D for C++</a>. It has been a busy year for physics engines in AS3.  <a href="http://drawlogic.com/2007/11/07/as3-foam-2d-physics-engine/" target="_blank">FOAM </a>was released this month, <a href="http://www.cove.org/ape/index.htm" target="_blank">APE</a>, <a href="http://lab.polygonal.de/2007/10/02/motor-physics-goes-open-source/" target="_blank">the highly anticipated Motor Physics from polygonal labs</a> and plenty more still I am sure.</p>
<p>The  <strong><a href="http://box2dflash.sourceforge.net/" target="_blank">Box2dFlashAS3</a> version has some great demos available on the site that show, use the arrow keys to move to the different demos highlighted here.   </strong></p>
<ol>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>bridge<br />
</strong></a><a href="http://box2dflash.sourceforge.net/" target="_blank"><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxbridge.png" border="0" height="283" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>ragdolls<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxragdolls.png" height="283" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>compound shapes<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxcompound.png" border="0" height="282" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>rube goldberg / domino / tank tracks etc<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxrube.png" border="0" height="283" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>stacked boxes<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxstacked.png" border="0" height="283" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>slider crank / piston<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxpiston.png" border="0" height="283" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>pulleys<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxpulleys.png" border="0" height="282" width="510" /></a></li>
<li><a href="http://box2dflash.sourceforge.net/" target="_blank"><strong>gears<br />
</strong><img src="http://i81.photobucket.com/albums/j223/drawkbox/boxgears.png" border="0" height="282" width="510" /></a></li>
</ol>
<blockquote><p><font> Box2DFlashAS3 is an open source port of Erin Catto&#8217;s powerful c++ physics library <a href="http://www.box2d.org/">Box2D</a>. Cycle through the demos to see some of the features.</font></p>
<p><font>Full source code for the engine and examples can be downloaded from the project&#8217;s sourceforge page found <a href="http://sourceforge.net/projects/box2dflash">Here</a>.</font></p></blockquote>
<p>This kit is nice because it mimics Box2D for the crossover and ability of developers to use it in C++ and Flash AS3 moreso than other kits. It looks good and performs well except for a memory or FPS pause I get intermittently.  The demos are already inspiring many uses of the features highlighted for games and effects.</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2007/11/18/new-as3-2d-physics-engine-box2dflashas3-based-on-box2d-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

