Archive

Archive for the ‘AIR’ Category

Fractal Letters

January 20th, 2009

On the way home last Thursday I decided to try creating fractal letters. The idea was to replace each “line” in a simple version of a letter with a copy of itself but allow for the aspect ratio of its dimensions to change so that the result is still recognizable as a letter. This is something like an L-system, of which the Dragon curve is one. After a weekend’s worth of work I have what amounts to thirteen different fractal letter algorithms for six different letters. 1 P, 3 A, 2 E, 2 R, 2 C, 3 N. Yes, those spell PAPERCRANE. Here is the first iteration (just the letters).

Fractal Letters, iteration 1

Fractal Letters, iteration 1

And here is the fifth iteration:

Fractal Letters, iteration 5

Fractal Letters, iteration 5

Some letters have variations in how they are drawn or how they repeat, or both (hence the 2 lines). The bottom N uses an algorithm I worked out which didn’t change the aspect ratio and had only one repetition per line. Both of the N variants in the words use two repetitions per line and constrict the width faster than the height, which leaves the N recognizable. The idea here, after all, was to make letters which had a cool fractal look but could still be read.

Click either of the pictures to view the flex app and play with the iterations yourself. Just drag (or click on) the slider on the bottom of the app to change the iteration.

Stay tuned, I have another blog post coming up soon specifically about that N on the bottom, the math required to create the algorithm, and some interesting (and beautiful) results I got when implementing a test program.

AIR, Flash, Flex, FlexBuilder, Fractal, Papervision3D, math , ,

No loading of Flex within AIR beta 2

November 14th, 2007

I’ve been trying to load a Flex application which is hosted on a website from within an AIR application which is also built with Flex. Things looked good when an HTML component displayed the website the application was on and allowed me to interact with the page through the DOM (automatically filling out form fields and submitting while listening for a load is a nice hack to avoid rewriting code for webservices :-). Once I got to the page with the flex application on it, however, I got nothing but the “install flash” message we show in the div that is usually replaced by SWFObject. No problem, SWFObject probably wasn’t up to it. Alas, a simple object/embed tag also failed to show the flex aplication. Somewhat disheartened, I also tried SWFLoader but got a security error when the swf tried to access its parent (ugh). A little searching showed some posts on Adobe’s forum and some bugs in their bug system that showed that neither of these things were supported. Flash files aren’t loaded in the HTML component in AIR because they haven’t figured out how to deal with it yet and Flex apps can’t be loaded into Flex apps due to the security sandbox and a Flex bug that triggers it. Oh well, I’ll have to settle for opening up a web page.

AIR, Flex , ,