Anne-Sarah Le Meur
...............Français...............

NEWS

3D Projects

- Aform
- Horgest
- In-BeesTw...
- Into the Hollow of...
    Where It Wants To...
    Eye-Ocean
     Performances
     Beyond-Round

Photos from reality

- Home lights
- Asies
- Atable
- To rise

Articles (all languages)

- Articles
- Quotations - references

Biography - CV

 

Programm extract

 

This code is extracted from the project Where it Wants to Appear-Suffer
Programming langage : C, C++, with WTK (World Tool Kit).

Changop : function to change the opacity values for two forms, in time, cyclically and continuously (the values vary between 0 and 1).
" num " is the current image number (the image which is calculated). Incremented for each image, it thus indexes passed time.
" table_materiau " is an external matrice which contains values of material
characteristics (shin, specular, diffusion, emission, etc.) of the considered form. One can access it through defined protocoles of the software.
" f " distinguishes forms : form 1, form 2, each owns its material matrice, and here, a different speed to vary opacity.
" rot " allows to vary the opacity of a form, from 'rot' to 0, and not any more from 1 to 0. A form will be able to stay constantly transparent, very
few opaque, or very few tansparent.

void changop(int f){
float votip = 2*vitop;
rot =1 ;
if (f == 0){
valu_matt[0]=fabs(sin(vitop*3.14*num));
WTmtable_setvalue(table_materiau,0,valu_matt,WTMAT_OPACITY);
}
if (f == 1){
valu_matt[0]=rot*fabs(sin(votip*3.14*num));
WTmtable_setvalue(table_materiau,1,valu_matt,WTMAT_OPACITY);
}
}



>> close the window