Forgotten code: fine structure 3D

July 5th, 2008

When I cobbled together ‘fine structure‘, I also tried my hand on a 3D version. For over a year, I completely forgot where I put the code, until this evening. Most of the code is rough but two pieces are presentable. Click the images to go to the constructs.

When in lo-res, move the mouse up or down to adjust the threshold level of the noise curves. Clicking the applet switches between dynamic lo-res mode and static hi-res mode.

fine structure 3D

 

fine structure 3D

Curvature

June 30th, 2008

Another series of sketches exploring organic curves.  Particles follow wandering paths, stopping when they cross another path. The shape of the path, the number of particles, the initial starting positions, the way the particles die,… all have a major impact on the final image.

The ultimate example of this drawing mechanism is Jared Tarbell’s masterpiece ‘substrate‘. Some of the fine pieces by Dave Bollinger also seem to use something like it.

Click on the image to go to the corresponding construct. A click of the mouse resets the piece. On some platforms the lines are not properly anti-aliased. I haven’t figured out why but it sure messes up the images.

Curvature01

Curvature02

Curvature03

Curvature04

Curvature05

Curvature06

Curvature07

Curvature08

Curvature09

Curvature10

Curvature11

cyclic: outwitted by a 1000 particles

June 21st, 2008

I have to admit, I’m hopelessly fumble-fingered in vector drawing. I never get the curves right, somehow they’re not smooth, not natural looking.

The funny thing is that a 1000 particles chasing each other from random starting positions seem to manage this quite nicely. Initial jagged chaos swiftly evolves into flowing curves, continuously trying to simplify themselves. Guess I’m not a sufficiently complex, self-interacting system :-(

Anyway I’m rather pleased with this construct. Pointless overkill makes me happy. The construct and its code can be found here. There’s no interaction beyond resetting with a click of the mouse.

Update: Lucas Tamarit pointed out, somewhat uh… pointedly, that this piece is very similar to ’sandtraveller’ by Jared Tarbell. Check this and the rest of his work out here. I’ve got to agree there’s definitely a resemblance. However, I’ve checked out the code and the mechanics behind ‘cyclic’ are really different from ’sandtraveller’, as is the rendering technique. I invite everybody else to make the comparison.

Not every painting of a sunflower is a Van Gogh forgery ;-)

cyclic

cyclic

cyclic

towards the within: toying with steering code

May 21st, 2008

Up to now, I’ve always treated particles as their physical equivalents: pointlike objects undergoing forces. As a physicist, this way of thinking comes natural, however it is fairly limiting. There’s a lot of work out there dealing with particles as agents, capable of steering towards goals, avoiding obstacles and flocking together in interesting ways.

Towards is my first step in exploring the possibilities of agent-generated graphics. It has an old-fashioned feel about it. (And yes, I got stuck on the black-white-red palette again…)

To get a feel of how this kind of explorative programming goes, I’ve uploaded seven versions showing the chronological (pro/re)gression of the code. All pieces need some time to reveal their true dynamics. Click on the applet to restart the construct.

towards 01
towards 02
towards 03
towards 04
towards 05
towards 06
towards 07

towards01

towards 04

towards 06

towards 07

Work in progress

April 23rd, 2008

For some unfathomable reason I’ve been spending my nights doing the dishes and, amazingly enough, sleeping. I’ve much have caught something. Anyway, two samples of work in progress, both based on the voronoi code.

voronoiFractal 2

voronoiFractal 4

Don’t ask about 3. Three is not a nice piece, it escaped. It lurks in the space between the walls, growling… Occasionally, it comes out and eats computers.

voronoiFractal2_0

voronoiFractal4_0

Oldies

April 9th, 2008

closer
closer

crystal
crystal

flow field
flow field

fine structure
fine structure

rotator I
rotator I

peripheral vision
peripheral vision

synthese eines raumes: original
synthese eines raumes

elements I
elements I

cathedral
cathedral

rose at lagrange 2
rose at lagrange 2

haywire
haywire

parameter VI
parameter VI

alignment
alignment

92
92

:etrono:e
:etrono:e

compound
compound

deconstruct 2D-3D
deconstruct 2D-3D

h.trism
h.trism

com III
com III

velvet painting
velvet painting

2 minutes
2 minutes

turmoil
turmoil

spring orchard
spring orchard

no i in me
no i in me

self-centered
self-centered

singular icon
singular icon

cline > decline
cline > decline

Free space looking for sketches

April 1st, 2008

I believe that there are many people out there that experiment with processing but don’t want to bother with domains or hosting. Well, my host has plenty of storage and monthly bandwitdh, far more than I’ll ever need. At this time there’s about 30Gb waiting to be filled (I’m currently using 60Mb) and I have about 300Gb bandwidth per month to spare.

So, if you got Processing sketches to share but no space to do it, feel free to send them over. Just a few pointers:

  1. Code should be shared under a Creative Commons license, similar to the one at the bottom of this page. I’ll waste no space on private code.
  2. Although it’s ultimately up to me to decide what goes online, I will not judge on esthetic or other purely personal grounds. The only criteria to refuse a piece are offensive content, malicious intent or blatant commercial abuse.
  3. Sketches should be submitted by email (check contact) as a zipped archive of the applet folder generated by Processing.
  4. I’ll host everything in a separate domain “guest.wblut.com” as a blog similar to mine. Each submitted piece will be a blog entry with link, screenshot, author, tags and description. Anything you want to go here, especially description and screenshot, you can put in the email. Keep the screenshot 450px wide or less (I don’t feel like messing with WordPress templates ;-) ). There are nicer alternatives than a simple blog, but it’s easier to keep content and comments organised.
  5. I will not host any other files. There’s enough other options out there.

In return, I’ll do my best to keep everything nice, tidy and punctual. Just to be clear, I’m not out for money, my pages, including the guest blog, are advertisement free and will always remain that way :-) .

Update : synchronicity… There’s another solution out there since the 22nd of march: http://www.openprocessing.org/. Cool, must be an idea whose time is right. Thanks to Andreas for pointing this out.

voronoi fractal

April 1st, 2008

I set myself a challenge last weekend: starting only from the code for the intersection point of two lines, I would try to make a Voronoi fractal applet without using any further reference. This actually had a reason: I can draw a Voronoi graph on paper but I do not know how to draw it. Bear with me on this, it’ll make sense…

Try it yourself, constructing a sketch of a Voronoi graph is simple:

  1. Draw some random dots.
  2. Connect all dots with straight lines.
  3. Bisect all connecting lines (i.e. draw a perpendicular straight line through the middle of the connecting lines).
  4. Select pieces of the bisecting lines so each point is encapsulated in its own cell.

One of my rough sketches:

voronoiManual

A deceptively simple process. Steps 1 to 3 are easy enough to implement, just a matter of basic geometry. The tricky part is point 4, I couldn’t figure out how I did it on paper. I, and undoubtely you too, just draw the cells based on the network of bisecting lines.

In the end, I found a way of making the computer do the same thing. But it involves a rather exhaustive search and is a far cry from the effortless elegance of a human being. Turning a Voronoi graph into something fractal-like was the next step. Getting the borders of each cell sorted out was a bit of headache but now works as long as floating-point errors don’t mess things up.

Two nights and an insight in yet another amazing way our brains work later, this is what I came up with. It definitely has potential for further development. As always the code is up for grabs (and rather rough). Currently, because it’s a bit of a memory hog, the online version is limited in depth . Update : I’ve replaced the applet with a new version using less memory.

voronoi fractal

strange symmetry

March 27th, 2008

Another old piece I spent a few extra hours on. Hundreds of particles with random starting positions are iterated, their coordinates (x,y) transformed by mundane mathematics. My homebaked expressions, several potentially chaotic attractors mangled together, look complex but are actually more weird than difficult - a bit like the expressions on the blackboard in a Gary Larson cartoon:

x right p_0 (sin(p_1 y) + p_2 cos(p_1 x))+(1-p_0)(y + p_3 x/delim{|}{x}{|} sqrt{delim{|}{p_4 x - p_5}{|}} )
y right p_0 (sin(p_6 x) + p_7 cos(p_6 y))+(1-p_0)(p_8-x)

The code randomly generates the parameters p1 to p8 (between -2 and 2) and p0 (between 0 and 1). Most results are not very special but an occasional gem shows up. There are ways of automatically eliminating many of the less interesting cases. These not only take time but inevitably remove some nice constructs. So I left out any preselection. Think of it as searching the beach for a rare shell…

Feel free to explore the 9 parameter universe with this online version. It is very unlikely that the picture that’s forming on your screen will ever be generated exactly the same on any other machine. Since every plot is unique it’s hard to get the correct scale and position, so you’ll have to do it yourself. Zoom in and out with ‘+’ and ‘-’. Move the construct with the arrow keys. The movement is a bit chunky because the image has to redraw every time the construct moves. Pressing ‘c’ cycles through several color palettes using the particle density, velocity and acceleration in different ways. Most importantly, pressing space saves the image to the user gallery. Nothing will appear to happen for a while but give it some time to finish. Since I intentionally neglected to provide a way of storing the 9 parameters, you can never recover a lost image which hasn’t been saved. The choice is yours, share the image and lose its uniqueness or keep it to yourself and lose it forever… Oh, any other key randomly generates a new construct.

Update : I’ve improved the interface a bit. Zooming now properly respects the centering. You can also move the construct by clicking and dragging the mouse. Pressing ‘r’ will center the image on the current mouse position.

strange symmetry

strange symmetry 2

+

March 21st, 2008

“I also believe - and hope - that politics and economics will cease to be as important in the future as they have been in the past; the time will come when most of our present controversies on these matters will seem as trivial, or as meaningless, as the theological debates in which the keenest minds of the Middle Ages dissipated their energies. Politics and economics are concerned with power and wealth, neither of which should be the primary, still less the exclusive, concern of adult human beings.”

Profiles Of The Future, Sir Arthur Charles Clarke (1917-2008)

hal