Friday, November 30, 2012

The Red Queen Hypothesis

"Well, in our country," said Alice, still panting a little, "you'd generally get to somewhere else — if you run very fast for a long time, as we've been doing."
"A slow sort of country!" said the Queen. "Now, here, you see, it takes all the running you can do, to keep in the same place. If you want to get somewhere else, you must run at least twice as fast as that!"

Wednesday, November 14, 2012


Another little simple function i've been using in some codes (thanks wolfram mathworld),especially to project agents, running 2D ,on a mesh face.You can use it to project vectors on any planes too,giving at least three points.You will need toxiclibs for this(i know there is a way to do the same thing with toxi rays).

    Vec3D projectOnTriangle3D(Vec3D r, Vec3D a,Vec3D b,Vec3D c) {
    float aa, bb, cc, dd;
    float x1 = a.x;
    float y1 = a.y;
    float z1 = a.z;
    float x2 = b.x;
    float y2 = b.y;
    float z2 = b.z;
    float x3 = c.x;
    float y3 = c.y;
    float z3 = c.z;
    aa = y1 * (z2 - z3) + y2 * (z3 - z1) + y3 * (z1 - z2);
    bb = z1 * (x2 - x3) + z2  *(x3 - x1) + z3  *(x1 - x2);
    cc = x1  *(y2 - y3) + x2 * (y3 - y1) + x3  *(y1 - y2);
    dd = -(x1  *(y2  *z3 - y3  *z2) + x2  *(y3  *z1 - y1 * z3) + x3 * (y1 * z2 - y2  *z1));
    float z = (-dd - aa * r.x - bb * r.y)/cc;
    Vec3D projVec = new Vec3D(r.x, r.y, z);
    return projVec;

Saturday, November 10, 2012


I have been working on a model of tripod (going on with my studies about agents and embodiment), directly inspired by robotic arms structure.Each tripod is composed by agents and springs.Each arm (like some models of robotic arm) is made up by struts and ties that gives the tripods its ability of self-sustaining. Each node of the arms is composed by agents that have different ability and functions.This combination gives the tripos the capacity of move , seek ,float, jump, stick together and self organize into larger assemblies. The variation of flocking parameters after clustering ,gives control on morphological and structural organization of the assemblies.I have to say that this model is very reminds me a lot some sci-fi movies about spiderbots invasion!!

TRIPODS INVASION!! from Paolo Alborghetti on Vimeo.