procedure TForm1.Initialisation; begin Rayon1 := Shape1.Height / 2; Rayon2 := Shape2.Height / 2; DeltaRayon := Rayon2-Rayon1; Limite := Sqr(Rayon1 + Rayon2); //carré de la somme des rayons end; Function TForm1.Contact : boolean; var x : real; begin DeltaLeft := Shape2.Left - Shape1.Left; DeltaTop := Shape2.Top - Shape1.Top; DeltaX := DeltaLeft+DeltaRayon; // Ecart horizontal DeltaY := DeltaTop+DeltaRayon; // Ecart vertical x := Sqr(DeltaX) + Sqr(DeltaY); // Carré de la distance Result := x < Limite; end;