An iris is a beautiful thing

December 19th, 2009 admin No comments

For a while now I have wanted to render out an iris in code alone, so I have now finally started experimenting in that direction.

I must say I am not unhappy with the results sofar, especially since I have stumbled onto some nice byproducts along the way :)

iris_render_v1 iris_render_v2 iris_render_byproduct iris_research_sidestep

I love particles

December 19th, 2009 admin No comments

This little diddy was inspired by Ralph Hauert’s beautiful Bloom animation.

Try moving your mouse and clicking every once in a while :)

attraction

Categories: art & technology, programming Tags:

L-systems revisited

November 16th, 2009 admin 3 comments

I sat down again to update my ActionScript L-system renderer so that it can use multiple rules and new characters.

Next, I fiddled around a bit with axioms, rules and angles and came up with some pretty cool new curves (if I may say so myself). Check them out below.
I’ve also added the renderer application, if you run it you can play around with the curves (controls are listed at the bottom of the app). If it is too slow, please decrease the number of iterations or resize the window to be smaller.

Read more…

Categories: art & technology, l-systems, programming Tags:

Drawing roots

September 1st, 2009 admin 1 comment

If you’ve ever felt the urge to draw plant roots, now’s your chance!

Categories: programming Tags:

Placebo Interactive Video

August 28th, 2009 admin 2 comments

Placebo has released a new single called “The Never-Ending Why”, which is accompanied by a fantastic music video, created by Champagne Valentine.

We at Random were asked to help in the creation of an interactive video to go alongside the linear video.

After a lot of hard work, the result turned out, if we may say so ourselves, amazingly cool!

Check out the linear video here, and try the interactive here.

Categories: game design, programming, web Tags:

Lightning in AS3

July 30th, 2009 admin 4 comments

I’ve been wanting to do this for a while, but never got around to figuring out how. Until now.

With the help of this post I created a simple but very effective random lightning generator in ActionScript 3.

I was surprised at the simplicity of it, and the clear explanation on drilian.com helped a lot.

So here it is: the lightning generator.

EDIT: per request I’ve put the source files online. Download here.

Categories: programming Tags:

L-system animation

July 30th, 2009 admin No comments

A long while ago I wrote a small Flex application to draw L-systems (post).
With this app I noticed how cool it is to play around with drawing angles by moving the slider (post #2).

But somehow, I never thought of adding a play button to the slider so it plays it as an animation.
So now I did. Well, no play button, but just an animation. Here it is. Please enjoy.

lsystem animator

Note: after clicking once, you can use the + and – keys to speed it up or slow it down

Categories: generative art, l-systems, programming Tags:

Central America kicks ass

June 20th, 2009 admin No comments

Wow, I noticed my blogging frequency has really been dropping lately.

Might be due to the fact that I´ve been travelling through Central America with my girlfriend for the past three months. And now it´s almost time to go home, but I can´t complain after having had the opportunity to visit Belize, Guatemala, Honduras, Nicaragua and Costa Rica. Life is good :)

I just want to let everyone know that Central America kicks major ass! I love it here, and will definitely ensure many returns in the future.

Read all about our journey on www.reisabit.com if you can read Dutch, or just enjoy the photos on there (select the central tab, which says ´reisverhalen´).

Categories: travel Tags:

stage scaleMode and stage size problems in Firefox

March 19th, 2009 admin 1 comment

Have you ever had the problem that, when opening the HTML that displays your Flash movie in the browser, all the stuff that is on stage i not positioned correctly?

I have. I encountered this problem with Firefox, when I noticed that objects were not centered on stage while this was the case when I ran the swf standalone or in Safari.

I managed to isolate the problem, and it turned out that what caused it was setting stage.scaleMode to StageScaleMode.NO_SCALE. After doing that, the stageWidth and stageHeight property values changed to zero.
It turned out that this could be solved by not implementing swfobject, but I didn’t want that, so I found a workaround in AS3.

To hack around this problem, I check the stageWidth and stageHeight values to see if either equals 0, and if so, I register a resize event listener, because I found that although the values become zero in Firefox, a resize event is also immediately dispatched after this. So setting a listener for this event and initializing the application inside the handler method solved my problem! Of course, you also want to trigger the handler manually in case there’s no bug, so I just call it directly if neither stageWidth or stageHeight equals 0.

Simple, huh? I know it’s a hack and I’d rather not need it, but at least my application behaves like I want it to now :)

Here’s the code:

public function Application()
{
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    if (stage.stageWidth == 0 || stage.stageHeight == 0)
    {
        stage.addEventListener(Event.RESIZE, handleStageResize);
    }
    else
    {
        handleStageResize();
    }
}

private function handleStageResize(event : Event = null) : void
{
    stage.removeEventListener(Event.RESIZE, handleStageResize);
    // initialize application here
}

Categories: programming Tags:

PaperVision3D one to one pixel representation

February 24th, 2009 admin 3 comments

It was hard for me to find the correct camera settings in papervision to achieve a one to one pixel representation of my objects at z = 0, so here they are:

camera.focus = 10;
camera.zoom = 100;

Voilá! Now move your DisplayObject3D to x, y and z = 0 and you should see it at its actual pixel size.

Categories: programming Tags: