RAM 3.0

Ram 3.0 is the follow-up of the original project, plus, animated details and interactions. The figure is now composed of two separate sections with different latency (when following the cursor). If clicked, the figure changes aspect and the background becomes black. ram3-02

float x;
float y;
float x1;
float y2;
float x3;
float y4;
float easing1 = 0.05;
float easing2 = 0.10;
float easing3 = 0.10;
float angle;
float gravity = 9.0;
float mass = 2.0;

PImage img;

void setup() {
background(255);
size(1000,1000);
img = loadImage(“RAM2.gif”);

}

void draw() {

background(255);

float targetX = mouseX;
float dx = targetX – x;
x += dx * easing1;
float targetY = mouseY;
float dy = targetY – y;
y += dy * easing1;

if(mousePressed == true){
background(0);
float targetX3 = mouseX;
float dx3 = targetX – x;
x += dx3 * easing3;
float targetY4 = mouseY;
float dy3 = targetY – y;
y += dy3 * easing3;
img = loadImage(“RAM Black.jpg”);
imageMode(CENTER);
image(img, x, y, 500,500);
} else {
img = loadImage(“RAM2.gif”);
imageMode(CENTER);
image(img, x, y, 500,500);

float targetX1 = mouseX;
float dx2 = targetX – x;
x += dx * easing2;
float targetY2 = mouseY;
float dy1 = targetY – y;
y += dy * easing2;

imageMode(CENTER);
img = loadImage(“RAM1.gif”);
image(img, x, y, 500,500);

{
}
}

}

Simone Sciacovelli

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s