/*
 * Spheres de couleurs differentes
 * @param {type} dots
 * @param {type} couleurs
 * @returns {undefined}
 */
function draw(dots, couleurs, nb_point, nb_param) {

    group.position.y = 0;

    var geometry = new THREE.SphereGeometry(28, 28, 28);
    var counter = 0;
    var icouleur = 0; //indice pour le tableau couleurs
    for (var i = 0; i < nb_point; i++) {
        if (icouleur >= couleurs.length) {
            icouleur = 0;
        }

        var material = new THREE.MeshBasicMaterial({color: couleurs[icouleur++]});

        var sphere = new THREE.Mesh(geometry, material);
        sphere.position.x = dots[counter];
        sphere.position.y = dots[counter + 1];
        if (nb_param === 3) {
            sphere.position.z = dots[counter + 2];
        }
        else sphere.position.z = 0;
        
        group.add(sphere);
        counter += nb_param;
    }
}