#include #include #include "09-Exercice4-Sphere2.h" int main(void) { sphere sp1 = { 2.3,{ 1.1,-1.9,-2.8 } }; sphere sp2 = { 3.3,{ 3.1, 2.9,-1.8 } }; sphere sp3 = { 4.1,{ 3.1, 2.9, 4.8 } }; printf("sp1 : %lf : %lf %lf %lf\n", sp1.rayon, sp1.centre.x, sp1.centre.y, sp1.centre.z); printf("sp2 : %lf : %lf %lf %lf\n", sp2.rayon, sp2.centre.x, sp2.centre.y, sp2.centre.z); printf("sp3 : %lf : %lf %lf %lf\n", sp3.rayon, sp3.centre.x, sp3.centre.y, sp3.centre.z); if (testerExistenceIntersection(sp1, sp2) == true) { printf("Les spheres sp1 et sp2 ont une intersection\n"); } else { printf("Les spheres sp1 et sp2 n'ont pas d'intersection\n"); } if (testerExistenceIntersection(sp1, sp3) == true) { printf("Les spheres sp1 et sp3 ont une intersection\n"); } else { printf("Les spheres sp1 et sp3 n'ont pas d'intersection\n"); } return 0; }