Massimo Vitali and some Math

Massimo Vitali’s work is allows the viewer to be invisible.  You can walk through a crowd of people and stare at everyone for as long as you want. His website provides possibly the most effective web experience that I have seen for a photographer using a large format.

Massimo Vitali

Massimo Vitali

The web site allows, through a flash logarithm, the viewer to pan the image, simulating a close-up inspection one might make in a gallery or museum. The inspection works perfectly for this type of work because it is all about the details, interactions and voyeurism of Vitali’s prints.

detail

detail

The panning image is by no means a new development in Flash, and by now the avid computer user is very used to this panning effect. It is a common effect in the Iphone’s interface, it is sometimes used in the 360 degree images, etc, etc. But the use in Vitali’s case is perfect.

An example of the code for the effect is:

this.onMouseMove = function() {
constrainedMove(bg_mc, 4, 1);
}
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};

From what I can gather,  the coordinates of the mouse are translated into a decimal corresponding to a percentage (45% = .45) and then divided by 100. When you divide an number less that one by 100, the result gets closer and closer to zero, and the result id translated into the speed of the effect.

The result is an easing slowdown of the pan that is un-computer-like and very natural for viewing a large print

Leave a Reply