August 18th, 2008
While working on a reference implementation in Actionscript for a demo effect, I accidentally ended up with this beauty. It’s based on the lovely City Traveler algorithm by Jared Tarbell with only a few minor adjustments actually. I thought I’d share nevertheless :) Be sure to stop it at some point, otherwise it will go on and on forever, eating up you cpu time.
As always, I also provide a larger version.
You can also dig out the source from the Processing repository, but it’s now buried under the more recent revision of the effect i was actually going for. So if you’re interested, better drop me a line ;)
Posted in actionscript, processing | 1 Comment »
August 18th, 2008
I updated my Abstract Foliage script for Scriptographer and also created a new one - the gearwheels.
We recently found ourselves in lack of an easy way to create the outline of a gearwheel. With stroke modifications it just seemed too hard. So i quickly wrote something up in Scriptographer. Hopefully someone will find some use for it.
The changes to Abstract Foliage include: I’m finally writing back the values from the config dialog to the internal variables… :P
You can grab the scripts on the Scriptographer homepage or right here:
Abstract Foliage 0.4
Gearwheels
Posted in scriptographer | No Comments »
June 20th, 2008
I wrote 3 small file templates for the AS3Project in FlashDevelop.
They come in quite handy when working on a PureMVC based project.
PureMVC-Command.as.fdt
PureMVC-Mediator.as.fdt
PureMVC-Proxy.as.fdt
I hope it helps someone ;)
Posted in actionscript, flashdevelop | No Comments »
June 17th, 2008
For ease of use i have a small batch file to generate the documentation for my ActionScript projects. It’s definitely nothing special, but if you struggle with the asdoc syntax and you just want a quick solution, here it is:
@echo off
set asdoc_bin="E:\projects\flex_sdk_3\bin\asdoc.exe"
set aswing_path="E:\projects\aswing\trunk\AsWing\bin"
%asdoc_bin% -doc-sources org\dirty_motherfucker\. -main-title "My ActionScript Project" -output "doc" -compiler.library-path %aswing_path%
pause
It also points asdoc to the bin directory of AsWing, where it will find the .swc files needed so it can fully understand each part of the sources in my namespace.
If you use several libraries, you will have to supply the library paths as well.
Now, let’s say you don’t have every library available as .swc and you also don’t feel like compiling one. Then you’d use -compiler.source-path. Here is an example of a project that uses more libraries.
@echo off
set asdoc_bin="E:\projects\flex_sdk_3\bin\asdoc.exe"
set aswing_path="E:\projects\aswing\trunk\AsWing\bin"
set aswingkit_path="E:\projects\AsWingKit\src"
set puremvc_path="E:\projects\PureMVC\src"
set tweenlite_path="E:\projects\TweenFilterLiteAS3"
%asdoc_bin% -doc-sources src\org\dirty_motherfucker -main-title "Content Delivery Framework" -output "doc" -compiler.library-path %aswing_path% -compiler.source-path %puremvc_path% %aswingkit_path% %tweenlite_path% src\ -warnings
pause
Also, note in this second example that i include src\ in the source paths. I only generate the documentation for the files in my namespace, but those use source file which reside in the same project directory, thus you should include the whole source directory to make sure everything runs smoothly.
Posted in actionscript, aswing | No Comments »
May 26th, 2008
I updated all the processing works to use a more common code base. Additionally i added start/stop functionality to the small versions displayed directly in the blog.
I also fixed a few minor (and some major) issues in the Sand Traveler project.
In the original code you will find the following line:
float tinc = ot+(1.1-t/num)*2*t*TWO_PI/num;
which i ported to:
var tinc:Number = ot + ( 1.1 - cityIdx / NUM_CITIES ) * 2 * cityIdx * MathHelper.TWO_PI / NUM_CITIES;
Now cityIdx (t) and NUM_CITIES (num) are both integers. Java (Processing) will correctly do the integer division (which always results in 0). Thus the whole term “(1.1-t/num)” always equals 1.1.
Now the Flex compiler has a different opinion on how this should be evaluated. The presence of 1.1 makes it case cityIdx and NUM_CITIES to Number as well.
This whole drama led to further errors in the original port. You can grab the fixed source from svn://dirty-motherfucker.org:8888/processing/trunk
Here are the new stand alone versions:
Buddahbrot
Happy Place
Sand Traveler
Substrate
Posted in actionscript, processing | No Comments »
May 22nd, 2008
2008-05-26: I fixed some parts of this port. For further details check the updated works post.
For this one i have to credit quite a few people.
As always, i started out with the Processing source by Jared Tarbell. He based his code on an implementation by Paul Bourke, who based his work on a technique invented by Melinda Green.
It’s pretty much a straight ahead port of Tarbell’s code. Nothing to say about it. Click it to activate it. This is the version with a bailout value of 20 (nice looking results fast).
I didn’t package up a .zip with the source. But you can get the latest versions of all my processing ports from: svn://dirty-motherfucker.org:8888/processing/trunk
I also changed some of the other ports in the meanwhile. Some small bugs slipped in the versions i uploaded to the blog. So if you’re interested, be sure to grab the latest sources from the repository.
Posted in actionscript, processing | No Comments »
May 22nd, 2008
2008-05-26: I fixed some parts of this port. For further details check the updated works post.
I saved one of my favorites by Jared Tarbell’s for now. The algorithm amazed me almost as much as Substrate did, but when i decided to port Tarbell’s works i knew i could put a little sugar into this one.
I started converting it straight ahead but i also added new blending modes. This implementation is basically Tarbell’s third variation of the original implementation. I made it so that the traveler’s sandpainters will either pick additive or subtractive blending. This leads to some pretty nice results.
I didn’t add a smaller version inside this post as it needs some time to develop and it also needs a certain size so you can fully appreciate it. So please check out the large version (1000×1000).
Be sure to also grab the source and check out the originals by Tarbell.
I also added a preview version:
Posted in actionscript, processing | No Comments »
May 15th, 2008
2008-05-26: I fixed some parts of this port. For further details check the updated works post.
I finished another one of Jared Tarbell’s works. Based on the experience with Substrate, this port was straight-forward.
I also just gave the new Flash Player 10 Beta a run for it’s money. I can only recommend installing it for a test runs on these Processing ports. On my Core2 Duo E6600 with FP9 one core is usually maxed out drawing these demos with reasonable speed. With FP10 i get fluid performance with CPU time to spare.
So here it is (click to start):
There is also a larger version (900×900).
As before you can also grab the source code.
Posted in actionscript, processing | No Comments »
May 13th, 2008
2008-05-26: I fixed some parts of this port. For further details check the updated works post.
Through a long web discovery session, i have come along the website of Jared Tarbell lately. If you aren’t familiar with his works you should definitely have a look.
Needless to say i was very impressed by his procedural image generation approaches, which are based on Processing.
So i decided to port some of his projects to ActionScript3. I have to admit that this wasn’t really a big task, as the source code can practically be copied & pasted directly into FlashDevelop and can be compiled to an SWF.
Something should be noted nevertheless. To achieve acceptable performance in a project like this it is fundamental to work directly with a BitmapData object and not the Graphics instances of the DisplayObjects.
So the only task that had to be done was to write some alpha-blending function and port a handful of Processing specific functions.
So here is my port of Substrate (click to start):
A larger version (1280×720) can be seen here. This version will also restart the animation when a limit of cracks has been reached.
You can also grab the source code and have some fun with it :)
Posted in actionscript, processing | No Comments »
May 8th, 2008
dragonworx, a user from the FlashDevelop message board took the time to write an SWC compilation plug-in for FlashDevelop.
So, if you’re a FlashDevelop user and you’re looking to compile an SWC library you should definitely have a look at this.
http://www.flashdevelop.org/community/viewtopic.php?t=2987
I personally have not yet put it to use as i am waiting until solutions are implemented in FlashDevelop and i can build all my crap in one go. Until then i still go for my .bat approach.
Posted in actionscript, flashdevelop | No Comments »