Blog

Elasticité d’un maillage – Action Script


Élasticité d’un maillage, Action Script [2008]

Essai de reproduction de code d’une bannière publicitaire trouvée sur le net.


L’original : Bannière Viacom, non créditée [nom : viacom_intro2k7.swf]

[swf:http://www.profusif.eu/wp-content/uploads/2017/05/viacom_intro2k7.swf 700]


La copie :

[swf:http://www.profusif.eu/wp-content/uploads/2017/05/00_Cubes.swf 550 400]


Le code de la copie :

var shapeFlag:Boolean = true;
var constante:Number = 17;
var constScreen:Number = 815;
var tab:Array = new Array();
var tabY:Array = new Array();
_global.matrice = new Array();
_global.sphere = new Array();
_global.whoIndex;
c1._alpha = 0;

function duplicate (movclip){
for (j=0; j<=constScreen; j++){
movclip.duplicateMovieClip(“a_”+(j), j);
var k:Number = adjust (j);
var l:Number = (adjust (j)*2);
setProperty (“a_”+(j), _y, k);
setProperty (“a_”+(j), _x, (j-l)*constante);
var clip = this[“a_”+(j)];
var hit_X = this[“a_”+(j)]._x;
var hit_Y = this[“a_”+(j)]._y;
var indexTab = j;
tab[j] = new Object( { obj1:clip, obj2:hit_X, obj3:hit_Y, obj4:test, obj5:indexTab} );
this[“a_”+(j)]._alpha = 63;
this[“a_”+(j)].onRollOver = function ()
{
circle_mc._x = _xmouse – ((constante * 11)/2);
circle_mc._y = _ymouse – ((constante * 11)/2);
matrice = zone(this);
}
}
}
function adjust (j){
var i = n = 0;
var m:Number = j;
for (n=0;n<24;n++){ if (m- constante * 2>=0) {m -= constante * 2;}
else if (m- constante * 2<0){break;}
}
i= constante * n;
return (i);
}
function zone(clip){
tabY.length = 0;
matrice.length = 0;
var k =0;
var whoBool = false;
for(j=-5; j<6; j++){
var str:String = clip._name;
StrIndex = str.slice(2);
StrIndex = int(StrIndex);
NumIndex = StrIndex;
var Yclip = tab[NumIndex + j].obj1;
var YindexTab = tab[NumIndex + j].obj5;
if (j==0) {whoBool = true;}
else if (j!=0) {whoBool = false;}
if (tab[NumIndex + j].obj3 == tab[NumIndex].obj3){
tabY[k] = new Object( { obj1:Yclip, obj2:YindexTab, obj3:whoBool } );
k++;
}
else if (tab[NumIndex + j].obj3 != tab[NumIndex].obj3){
if (tabY.length == 0){}
if (tabY.length != 0){tabY.length = k; break;}
}
}
k = -5;
for(j=0; j<11; j++){
indexOrigine = tabY[0].obj2 + (k * (2*constante));
if (indexOrigine<0){k++;} else if (indexOrigine>0){break;}
}
i = 0;
var seuil = 0;
for (j=0;k<6;j++,k++){
for(i=0;i<tabY.length;i++){
var temp = (indexOrigine + i) + ((2*constante)*j);
if(temp<=(tab.length-1)){ Mclip = tab[temp].obj1; Mhit_X = tab[temp].obj2; Mhit_Y = tab[temp].obj3; var temp2 = (j * tabY.length) + i; var posY = k; var posX = i; matrice[temp2] = new Object({ obj1:Mclip, obj2:Mhit_X, obj3:Mhit_Y, obj4:Mtest}); if ((tabY[i].obj3 == true)&&(k==0)){ whoIndex = temp2; } } else if(temp>tab.length){seuil = 1; break;}
}
if (seuil ==1){break;}
}
return (matrice);
}
duplicate (c1);

trace(getTimer());

//____________________________________________________________________________________

var raideur = 0.2;
var frottement = 0.95;
vx = vy = v2x = v2y = 0;
var ATANSCALE = 2/Math.PI;
var first_x = first_y = 0;
var widthX = heightY = 187;

onEnterFrame = function() {
for (i=0;i<tab.length;i++){
tab[i].obj4 = circle_mc.hitTest(tab[i].obj2, tab[i].obj3, shapeFlag);
if (!tab[i].obj4){
ax = raideur * ((tab[i].obj2 – tab[i].obj1._x)/3);
ay = raideur * ((tab[i].obj3 – tab[i].obj1._y)/3);
vx += ax;
vy += ay;
vx *= (frottement * 1);
vy *= (frottement * 1);
tab[i].obj1._x += vx;
tab[i].obj1._y += vy;
}
}
for (i=0;i<matrice.length;i++){
matrice[i].obj4 = circle_mc.hitTest(matrice[i].obj2, matrice[i].obj3, shapeFlag);
if (matrice[i].obj4){
var total = matrice.length-1;
var y_mc = matrice[i].obj3 – matrice[0].obj3;
var x_mc = matrice[i].obj2 – matrice[0].obj2;
if ((matrice[whoIndex].obj2 < (constante*5))||(matrice[whoIndex].obj3 < (constante*5))){
if (matrice[whoIndex].obj2 < (constante*5)){
x_mc = matrice[i].obj2 – matrice[0].obj2 + ((constante*5) – matrice[whoIndex].obj2);
}
if (matrice[whoIndex].obj3 < (constante*5)){
y_mc = matrice[i].obj3 – matrice[0].obj3 + ((constante*5) – matrice[whoIndex].obj3);
}
var xk=(x_mc / widthX)*2-1;
var yk=(y_mc / heightY)*2-1;
var zk = Math.sqrt(1.3-(xk * xk + yk*yk));
var xs = Math.atan( xk / zk ) * ATANSCALE;
var ys = Math.atan( yk / zk ) * ATANSCALE;
if (matrice[whoIndex].obj2 < (constante*5)){ var xtex = (matrice[0].obj2 – ((constante*5) – matrice[whoIndex].obj2))+(widthX * (xs+1)/2); } else if(matrice[whoIndex].obj2 >= (constante*5)){
var xtex = matrice[0].obj2 + (widthX * (xs+1)/2);
}
if (matrice[whoIndex].obj3 < (constante*5)){ var ytex = (matrice[0].obj3 – ((constante*5) – matrice[whoIndex].obj3))+(heightY * (ys+1)/2); } else if(matrice[whoIndex].obj3 >= (constante*5)){
var ytex = matrice[0].obj3 + (heightY * (ys+1)/2);
}
}
else if ((matrice[whoIndex].obj2 >= (constante*5)) && (matrice3[whoIndex].obj3 >= (constante*5))){
var xk=(x_mc / widthX)*2-1;
var yk=(y_mc / heightY)*2-1;
var zk = Math.sqrt(1.3-(xk * xk + yk*yk));
var xs = Math.atan( xk / zk ) * ATANSCALE;
var ys = Math.atan( yk / zk ) * ATANSCALE;
var xtex = matrice[0].obj2+(widthX * (xs+1)/2);
var ytex = matrice[0].obj3+(heightY * (ys+1)/2);
}
var tempX = ((xtex – matrice[i].obj2)) + matrice[i].obj2;
var tempY = ((ytex – matrice[i].obj3)) + matrice[i].obj3;
var difX = matrice[i].obj2 – tempX;
var difY = matrice[i].obj3 – tempY;
var clipS = matrice[i].obj1;
var oldSX = matrice[i].obj2;
var oldSY = matrice[i].obj3;
var newSX = matrice[i].obj2 + difX;
var newSY = matrice[i].obj3 + difY;
sphere[i] = new Object( {obj1:clipS, obj2:oldSX, obj3:oldSY, obj4:newSX, obj5:newSY, obj6:a2x, obj7:a2y, obj8:v2x, obj9:v2y} );
sphere[i].obj6 = raideur * (sphere[i].obj4 – sphere[i].obj1._x);
sphere[i].obj7 = raideur * (sphere[i].obj5 – sphere[i].obj1._y);
sphere[i].obj8 += sphere[i].obj6;
sphere[i].obj9 += sphere[i].obj7;
sphere[i].obj8 *= frottement;
sphere[i].obj9 *= frottement;
sphere[i].obj1._x += sphere[i].obj8;
sphere[i].obj1._y += sphere[i].obj9;
}
}
trace(getTimer());
}

//____________________________________________________________________________________

gotoAndPlay(5);

IUT Tremblay-en-France Graphisme


Logo IUT de Tremblay-en-France [2006]

 



Brochure IUT de Tremblay-en-France [2006]

Suivant maquette fournie.
Crédit des photographies utilisées : IUT de Tremblay-en-France.
Dépliant tripartite (A3).
Format plié : 14 * 29.7.



Chemise porte-documents [2006]

Format A5, pliable, pour un contenu en format A4.


Matériel graphique attenant :


Tests de matériaux : caustiques, spécularité, réflexion, réfraction, highlights.



Carte de vœux IUT de Tremblay-en-France [2007]

Crédit des photographies utilisées : IUT de Tremblay-en-France.



Carte d’invitation IUT de Tremblay-en-France [2007]

Crédit des photographies utilisées : IUT de Tremblay-en-France.



Carte de vœux IUT de Tremblay-en-France [2008]

Proposition retenue :

Autres propositions :



 

Mondes flottants


Mixages photographiques (photomontages) et appropriations.
Ces images ont toutes été trouvées (prélevées, volées) sur internet.
Robert Capa (ou Gerda Taro) aurait dit : « Si ta photo n’est pas bonne, c’est que tu n’étais pas assez près ».
La plus grande proximité que je puisse établir avec ces images est celle du pixel par pixel.

Les mondes flottants : une Faculté de Juger [2007]



Les mondes flottants : des Raisons Pures [2007]



Les mondes flottants : une Raison Pratique [2007]



 

Meduse – Animation


Méduse [2007]

Méduse, ma Méduse, ne vois-tu rien venir ?

C’est l’histoire d’une méduse qui tourne en rond dans son bocal.
Elle bouge pour la beauté du geste ; elle bouge pour engendrer des vibrations et faire imploser la bulle.

Expérimentation de lens flare, halo, shatter effect, assignation de formes et textures à des particules, etc.



 

Ceci n’est pas un jeu


Animation pour le film documentaire Ceci n’est pas un jeu [2007]

Réalisation : Gilles Corre.
Image tournage US et montage : Lionel Chaumet.
Production : Doc Ad Hoc.
Dimensions : 1024*576.



 

Quand le travail voyage – Prop. habillage


Propositions d’habillages pour le film documentaire Quand le travaille voyage [2006]

Réalisation : Chantal Richard.
Production : Ex-Nihilo.
Dimensions : 1920*1080.

Habillage type Colonne Morris


Habillage type Rotative






 

Jokkondiral – Correction


Réparation d’images pour le film documentaire Jokkondiral, une histoire d’alliances [2006]

Documentaire portant sur le film Lili et le baobab (2006), de Chantal Richard.
Réalisation : Valérie Mégard.
Montage : Lionel Chaumet.
Production : AGAT films & Cie.

 



 

Musée du Château des Ducs de Bretagne – Bornes interactives [Hyptique]


Stage d’infographie au sein de l’agence web Hyptique (Paris) [2005]

* Exécution d’animations/habillages pour des bornes multimédias interactives du Musée du Château des Ducs de Bretagne [Nantes]

– 7 scénarios, en vue d’une intégration sous Director
– préparation des médias HD fixes (nettoyage, retouches, corrections – images ci-dessous, parmi les plus abîmées) ;
– animations suivant storyboards, sous After Effects.
Dimensions : 1920*1080.

Matériau pour intégration :

Exemple de visuel :


Matériau pour intégration :

Exemple de visuel :


Stage d’infographie au sein de l’agence web Hyptique (Paris) [2005]

* Séquençage pour DVD ludiques interactifs de Questions pour un Champion :
-> mise à jour de la version 2005 ;
-> montage vidéo de la version Junior (derush de plusieurs centaines de séquences selon timecodes, étalonnage, tests, etc.)