Creating generative art in haXe and OpenFrameworks (March 2011)

April 4th, 2011  |  Published in Uncategorized  |  2 Comments

It’s already the 3rd month of doing a piece of generative art everyday. Here are some selected pieces.

Reused previous month’s feather code to make a sensitive plant.
20110225_210355

Backed to play with abstract geometry. I like its sketch style wooden texture.
20110227_191144

Following one gives some nice harmonic color.
20110305_202302
20110305_202309

Replacing lines with circles, it’s now more saturated.
20110306_202618

Since Martin Lindelöf made available its clothx physics lib, which is based on traer physics for Processing, I used its spring/attraction system to draw some stuff.
20110308_193753

It is very easy to create beautiful structures with the lib.
20110311_031007
20110311_031333

More organic one. Stroke size is proportional to particle speed.
20110313_172705

Linking up the particles.
20110314_161400

Sorting the particles before drawing in each frame.
20110315_171922

Old school generative curves. Can you hear the sound?
20110318_214522

Smaller, moving strings.
20110321_173927

Fixed, more complex strings with rainbow colors.
20110322_172246

Scaling up.
20110323_173620

Scaling down with blood vessel colors.
20110326_001833

Even more complex strings. Simply drawing them down but not painting them frame-by-frame like the previous ones.
20110328_195131
20110329_232009
20110330_033407

Colored version. It looks like coral. Maybe the algorithm is similar to coral’s growth.
20110331_235757
20110401_223752

Tags: , , ,

hxOpenFrameworks is now on haxelib!

March 26th, 2011  |  Published in Uncategorized  |  10 Comments

Yup, it’s there. You can now grab hxOpenFrameworks via haxelib install hxOpenFrameworks. It is using a version of openFrameworks that is slightly more recent than 0.062(current latest release). All Windows/Mac/Linux is supported (only 32bit though).

For those haven’t tried haxe/cpp:

  1. Go install haxe.
  2. Install c++ development tools.
    • Windows: Visual Studio (Express version is free)
    • Mac: XCode (in order to get GCC)
    • Linux: GCC (should be already there)
  3. Open up Terminal (Windows users please choose “Visual Studio Command Prompt” from start menu)
    1. haxelib setup
      It is need for 1st time use of haxelib. Simply press enter to set to the default path.
    2. haxelib install hxOpenFrameworks
      It will install hxOpenFrameworks as well as the dependencies (HSL and hxRtAudio). Mac user should also install Jack OSX manually.
  4. Browse to hxOpenFramework and try compiling the examples.
    1. Windows: cd C:\Motion-Twin\haxe\lib\hxOpenFrameworks\0,062,0
      Mac/Linux: cd /usr/lib/haxe/lib/hxOpenFrameworks/0,062,0
    2. Open of/examples/Main.hx(previously is in the root dir, see issue 1) and uncomment one of the examples.
    3. haxe compile-{your_platform}.hxml

Please refer to openFrameworks website for API documentation.

Tags: ,

Creating generative art in haXe and OpenFrameworks (Feb 2011)

February 22nd, 2011  |  Published in Uncategorized  |  8 Comments

I continue the journey of creating a piece of generative art everyday. And I am still using hxOpenFrameworks. BTW, since I don’t have a Mac running at this moment, I can’t have a Mac build. And actually I’m still messing with the Linux build… So hxOpenFrameworks is currently Windows only. I will release it to haxelib once it is cross-platform.

Anyway, here below are the selected pieces from my set of creations.

After last time I discovered the beauty of physics, I went with some typical simulations…shooting bullets.
It is not in real-time, but a frame-by-frame rendering. It would be nice if there is a haXe binding to PhysX or something.
YouTube Preview Image

Following is simply putting some circles from inside of a grid of sands. Look pretty like corruption.
YouTube Preview Image

And then there is a series of connecting points on a circle. It generates soooo many patterns with a single algorithm, I have to align the variations in a grid. Don’t draw them on a paper, it may summon a fire ball or something, don’t say I haven’t warned you ;)
20110128_010311
20110129_003509

Since I was leaking idea, so better do some old school recursive stuffs… Turn out applying color on them can give you nice harmonic color scheme, and the proportion is perfect!
20110201_000052

I like the following one very much. It first generates an array of points according to some regular polygon math, then sorts them according to the angle from origin and finally links them up.
20110207_022130

Same as above, but reversed part of the math so the lines point outward.
20110208_002628

Still playing with the above idea, but applied lots of tweaks to bring the interesting parts out.
20110210_064234

In the latest weeks, I have been trying to create more concrete graphics. It takes more time then messing around with math equations, but I have more artistic control. First one plays with circuit board like structures.
20110216_103158

Applying Tron-style color.
20110217_080342

Second concrete thing I created is a feather, as I really like birds. I used the easing equations(which are usually used for tweening) by Robert Penner to create the curves.
20110220_135143

Creating a pair of wings is easy when you have feathers.
20110221_213250

And finally, why not have 3 pairs when you simply can? Here comes a seraph.
20110222_020632

Tags: , , ,