/*
 * Dessine un tube avec lumieres et texture bumpmap pour donner un aspect metallique
 * @param {type} dots
 * @param {type} couleurs
 * @returns {undefined}
 */
function draw(dots, couleurs, nb_point, nb_param) {

    noodle(dots, nb_point, nb_param);

    var map = THREE.ImageUtils.loadTexture("../img/texture/metal3.jpg");
    var bmap = THREE.ImageUtils.loadTexture("../img/texture/metal3bumpmap.jpg");

    var tubeGeometry = new THREE.TubeGeometry(new THREE.SplineCurve3(nurbsControlPoints), 150, 15, 4, false);
    var materialTube = new THREE.MeshPhongMaterial({
        color: couleurs[0],
        ambient: 0x030303,
        specular: 0xc0c0c0,
        shininess: 30,
        bumpMap: bmap,
        map: map
    });
    var tubeMesh = new THREE.Mesh(tubeGeometry, materialTube);
    tubeMesh.position.set(0, -100, 0);

    var plight1 = new THREE.PointLight(couleurs[0], 1, 0);
    var plight2 = new THREE.PointLight(couleurs[0], 1, 0);
    plight1.position.set(-400, 0, 40);
    plight2.position.set(300, 100, 40);

    scene.add(plight1);
    scene.add(plight2);

    var spotLight = new THREE.SpotLight(0xffffff, 6);
    spotLight.position.set(0, 1000, 100);

    scene.add(spotLight);

    group.add(tubeMesh);
}