spherecylinder.js
// Construction de l'aile Droit et de l'antenne sur celle ci
Construction de l'aile Droit et de l'antenne sur celle ci
Construction de l ' aile Droit et de l ' antenne sur celle ci
function aileDroit() {
    modelview = initialmodelview;
    modelview = mult(modelview, translate(4, -2, 13));
    modelview = mult(modelview, rotate(270, 1, 0, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(1.2, 0.8, 0.2));
    trapeze1.render();
    modelview = initialmodelview;
    modelview = mult(modelview, translate(6.25, -2, 21));
    modelview = mult(modelview, rotate(270, 1, 0, 0));
    modelview = mult(modelview, rotate(180, 0, 1, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.75, 0.4, 0.2));
    trapeze2.render();
    modelview = initialmodelview;
    modelview = mult(modelview, translate(0, -2, 18));
    modelview = mult(modelview, rotate(90, 0, 1, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.3, 0.3, 0.6));
    cylindre.render();
    modelview = initialmodelview;
    modelview = mult(modelview, translate(-6, -2, 18));
    modelview = mult(modelview, rotate(90, 0, 1, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.2, 0.2, 0.6));
    cylindre.render();
    setColor(1,0,0,0,0,0,1,0.1,0.1);
    callTexture(spark, gl.TEXTURE4, 4);
    modelview = initialmodelview;
    modelview = mult(modelview, translate(4.5, -1.7, 15));
    modelview = mult(modelview, rotate(90, 0, 1, 0));
    modelview = mult(modelview, rotate(90, 1, 0, 0));
    normalMatrix = extractNormalMatrix(modelview);  
    modelview = mult(modelview, scale(0.2, 0.55, 0.01));
    trapeze1.render();
    resetColor();
    resetTexture();
}
function aileDroit ( ) { modelview = initialmodelview ; modelview = mult ( modelview , translate ( 4 , - 2 , 13 ) ) ; modelview = mult ( modelview , rotate ( 270 , 1 , 0 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 1.2 , 0.8 , 0.2 ) ) ; trapeze1 . render ( ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 6.25 , - 2 , 21 ) ) ; modelview = mult ( modelview , rotate ( 270 , 1 , 0 , 0 ) ) ; modelview = mult ( modelview , rotate ( 180 , 0 , 1 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.75 , 0.4 , 0.2 ) ) ; trapeze2 . render ( ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 0 , - 2 , 18 ) ) ; modelview = mult ( modelview , rotate ( 90 , 0 , 1 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.3 , 0.3 , 0.6 ) ) ; cylindre . render ( ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( - 6 , - 2 , 18 ) ) ; modelview = mult ( modelview , rotate ( 90 , 0 , 1 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.2 , 0.2 , 0.6 ) ) ; cylindre . render ( ) ; setColor ( 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0.1 , 0.1 ) ; callTexture ( spark , gl . TEXTURE4 , 4 ) ; modelview = initialmodelview ; modelview = mult ( modelview , translate ( 4.5 , - 1.7 , 15 ) ) ; modelview = mult ( modelview , rotate ( 90 , 0 , 1 , 0 ) ) ; modelview = mult ( modelview , rotate ( 90 , 1 , 0 , 0 ) ) ; normalMatrix = extractNormalMatrix ( modelview ) ; modelview = mult ( modelview , scale ( 0.2 , 0.55 , 0.01 ) ) ; trapeze1 . render ( ) ; resetColor ( ) ; resetTexture ( ) ; }
Construction de l'aile Droit et de l'antenne sur celle ci
Construction de l ' aile Droit et de l ' antenne sur celle ci
// always extract the normal matrix before scaling // always extract the normal matrix before scaling // always extract the normal matrix before scaling // always extract the normal matrix before scaling // always extract the normal matrix before scaling