Liquid System

This is a really cool liquid visualization that I came across awhile ago. Moving the mouse around lets you navigate through these suspended bubbles. It allows you to zoom in and out as well. Adding a z dimension to processing is something I would like to eventually get into and understand, I’m sure its actually relatively simple. This particular example almost feels like frozen beer or something.

[link here]

Virtual Urbanity

Virtual Urbanity is a thesis project that was designed by Rafail Bakolas at the Bartlett School of Graduate Studies. It was programmed using the processing language. It is a parametric simulation engine which models a vast and diverse amount of 3D urban configurations. It is based on a Lindenmayer system which I think works like fractals. Or even like Processing on some level. So there would be a set of rules (if this, then that) which take a string of input and produces an output that grows exponentially. This project defines the topology, the geometry, the width, the length, the density and the spatial significance of the streets. Conceptually the aim is to draw relationships between the creation of a realistic urban setting in the physical world to the abstract imaginary environment of the virtual world.

 

Here is where you can get a pdf of the thesis. It’s pretty interesting stuff.

Virtual Urbanity: A parametric tool for the generation of virtual cities

Cool Visualization

Hey guys,

I ran across this project and really like its functionality. I’m trying to mess with the source code to develop something similar myself but maybe with different shapes and reactions. We will see how it goes. Anyway its a really cool simple idea that I could see growing and developing into something interesting. As it stands now it functions very well and is fun to play with. I keep wanting to combine applets like this with music to create a music visualization that is possible interactive in some way. I will try to embed this applet, hope it works, so you guys can see it. Otherwise just copy the source code into processing and it will run. All credits to the author of the code, Daniel Winkler.

If this embed doesn’t work, just see this link here http://www.openprocessing.org/visuals/?visualID=3148

Source Code:

// 2009 Daniel Winkler http://www.phyloa.com

Particle[] parts = new Particle[300];
PVector O = new PVector();

void setup()
{
size( 800, 600, P3D );
frameRate( 30 );
for( int i = 0; i < parts.length; i++ )
{
parts[i] = new Particle();
}
noStroke();
smooth();
fill( 30, 200, 255 );
}

void draw()
{
O.set( mouseX, mouseY, -500 );
background( 0 );
lights();
for( int i = 0; i < parts.length; i++ )
{
parts[i].update();
}
}

int size = 7;

public class Particle
{
PVector loc = new PVector( random( 0, width ), random( 0, height ), random( -300, -700 ) );
PVector speed = new PVector();

public Particle()
{

}

public void update()
{
if( mousePressed )
{
PVector dir = new PVector( mouseX, mouseY, -500 );
dir.sub( loc );
dir.normalize();
speed.add( dir );
}
else
{
speed.mult( .9 );
}
loc.add( speed );
pushMatrix();
translate( loc.x, loc.y, loc.z );
rotateToFace( loc );

beginShape( QUADS );
vertex( -size, -size, 0 );
vertex( size, -size, 0 );
vertex( size, size, 0 );
vertex( -size, size, 0 );
endShape();
popMatrix();
}
}

// O is your object's position
// P is the position of the object to face
// U is the nominal "up" vector (typically Vector3.Y)
// Note: this does not work when O is straight below or straight above P
PVector U = new PVector( 0, 1, 0 );
void rotateToFace( PVector P )
{
PVector D = new PVector( );
D.set( O );
D.sub( P );
PVector Right = U.cross( D );
Right.normalize();
PVector Backwards = Right.cross( U );
Backwards.normalize();
PVector Up = Backwards.cross( Right );
applyMatrix(Right.x, Right.y, Right.z, 0, Up.x, Up.y, Up.z, 0, Backwards.x, Backwards.y, Backwards.z, 0, 0, 0, 0, 1);
}