Close Show/hide page

Processing - 3D Spiral Patterns

May 5th, 2008
Thumbnail - Click me

I’ve been getting comfortable with Processing over the last few days by experimenting with what else but … particles. The three-dimensional patterns that emerge by moving the sliders to change the internal parameters can be quite complex and unexpected, and sometimes strange attractor-like.

The algorithm governing the particle motion is very straightforward. New particles are created with a starting orientation which rotates linearly on 2 axes over time. On each frame, a given amount of x, y, and z rotation is added to each particle and then the particle is translated according to its orientation by a steadily increasing distance.

Click on the buttons in the bottom right corner to change the order that the x, y, and z rotations are applied (which creates very different results from each other). The 3 sliders on top-left control the amount of rotation added per frame; the two sliders in the middle control the rate of ’spin’ for the initial orientation of new particles; and the slider on the right controls the ’speed’ that particles move away from the point of origin.

Main class file| Full source code

Licensed under a Creative Commons Attribution 3.0 License.


Personal wiki of developer notes

April 30th, 2008

Kind-of just for the hell of it as much as for any potential use value, I’ve converted all my notes related to programming, Flash, etc. - which used to live in various text files as various versions on various computers - into a wiki format. And have made it publicly viewable. Because, I figure, why not?

http://wiki.zeropointnine.com

Much thanks to Adam Smith for the idea. Have fun in L.A.

Webcam Digital Video Recorder for AIR, updated

April 9th, 2008

Webcam DVR has been updated for compatibility with the release version of Adobe AIR. I didn’t introduce any serious changes with this version. I don’t have the time to self-QA this in the way it deserves, so if you run across any bugs - big or small - please let me know!

Download (Adobe AIR file, 291K)

Requires the Adobe AIR runtime.

See the original post for more info and usage notes.

Apologies for the cobwebs on this site. I’ve been pretty busy with .. work.

Testing Kinematics with Papervision3D, Collada

January 30th, 2008
Thumbnail - Click me

A forward kinematics experiment using Papervision3D v2.0 alpha and a Collada 3D model of a robotic arm.

Hope you enjoy it.

I don’t want to release any source from this yet, as I want to do some more work on it, relating to the following items…

Read the rest of this entry »

Papervision3D training in San Francisco at EVB

January 15th, 2008

Just wanted to let anyone in or around the Bay Area know that there’s going to be a Papervision3D training with John Grden on the weekend of February 3-4 in San Francisco. It’s being held at EVB, which is where I work.

Here’s the link: http://pv3d.eventbrite.com/

If you’re going, look me up, as I’ll be there…

A Papervision 2.0 alpha example

January 7th, 2008
Thumbnail - Click me

I drew up this example a few weeks ago to learn about the new features in Papervision 2.0 alpha. If you’re thinking of looking into the new version, then hopefully you’ll find the supplied source code below of some use. I used the code from this screencast on unitzeroone.com as a starting point.

The source code has example usage of the following things…

Read the rest of this entry »

Collision detection between particles and polygons

January 5th, 2008
Thumbnail - Click me

A basic example of collision detection in 3D, where moving particles bounce off a static terrain.

[By the way, my apologies for the cobwebs that have accumulated on this site; I’ve been busy over the past few months dealing with moving back to the Bay Area from Detroit :) ]

A couple things on it which could be of use …

Read the rest of this entry »

Particle Field

September 24th, 2007
Thumbnail - Click me

A matrix of vectors acting upon a field of particles. Reminiscent of falling water or snow, slightly. Click and drag to ‘draw’ vectors on the field to influence the movement of particles.

For me, the idea comes from Charles Forman’s blog post in Setpixel from 2004, “Snow is fun.” Which is incredibly great. And done in Processing.

Source code:

- Actionscript 3 class

- Full project (Flash 9/AS3)

Licensed under a Creative Commons Attribution 3.0 License.

SimpleFlvWriter.as - AS3 Class to Create FLV’s

September 8th, 2007

An Actionscript 3 class for use with Adobe AIR to create uncompressed Macromedia Flash Video (FLV) files to the local filesystem. It will add proper onMetaData info as well. It’s very simple to use.

Example usage:

var myWriter:SimpleFlvWriter = SimpleFlvWriter.getInstance();
myWriter.createFile(myFile, 320,240, 30, 120);
myWriter.saveFrame( myBitmapData1 );
myWriter.saveFrame( myBitmapData2 );
myWriter.saveFrame( myBitmapData3 ); // ... etc.
myWriter.closeFile();

See the comment blocks in the source for more info. It doesn’t support audio.

This comes out of the app I made a little while ago, Webcam DVR. I’m posting the class file now because the app is fresh in my mind, as I just updated it to make it compatible with the current AIR runtime to enter it into the Adobe AIR Developer Derby.

Download Webcam DVR for AIR, updated for the beta AIR runtime (See the previous Webcam DVR post for usage notes).

Licensed under a Creative Commons Attribution 3.0 License.

Seam Carving in AS3, with source

September 2nd, 2007
Thumbnail - Click me

Seam carving — the recently unveiled technique by Shai Avidan and Ariel Shamir to intelligently resize images (YouTube; white paper) — really captured my imagination when I came across it last night, as it has for many others.

Like Hector Yee (whose writeup was very useful), I decided — geek that I am — to try my hand at an implementation of it just for the hell of it. But in Actionscript 3.

The attached demo only resizes images vertically, not horizontally. I wish I could have, but didn’t bother including a dynamic image loader. It’s also, well, very pokey, but the code is readable and the output seems accurate. If you can stand the wait, press [M] a few times to load up the seam calculation queue.

But the most valuable thing about this demo is its publicly available source code under a Creative Commons license:

Static utility class | App class | Project ZIP file

So if you’re so inclined, please improve, extend, optimize, and/or port this code. I’m not planning on doing any further work on it. Just let me know if you find the code useful, and share your work.

If you’re interested in a more fully-realized online demo of seam carving, someone’s done it up in Java here.

Update: Additionally, as it turns out, Patrick Swieskowski has already put up an online seam carving Flash demo here.

Version: 0.8

Licensed under a Creative Commons Attribution 3.0 License.