hi
ich bin es jetzt mal druchgegangen und habs in ne andere sprache © umformuliert:
#include <math.h>
#define pi 3.14159;
main()
{
float xm1, ym1, r1, xm2, ym2, r2, am1m2, q37, q38, q39, xs1, ys1, xs2, ys2, schnittp;
printf("\n\nSchnittpunkte von 2 Kreisen\n\nMittelpunkt und Radius von Kreis 1: X,Y,R ");
scanf("%f %f %f",&xm1, &ym1, &r1);
printf("\nMittelpunkt und Radius von Kreis 2: X,Y,R ");
scanf("%f %f %f",&xm2, &ym2, &r2);
schnittp = 0;
if ( (xm1 == xm2) && (ym1 == ym2) ) goto ende;
am1m2 = sqrt( ( ( xm1 - xm2 ) * ( xm1 - xm2 ) ) + ( ( ym1 - ym2 ) * ( ym1 - ym2 ) ) );
q37 = ( ( am1m2 * am1m2 ) + ( r1 * r1 ) - ( r2 * r2 ) ) / ( 2 * am1m2);
q38 = r1 + r2;
if ( am1m2 > q38 ) goto ende;
q38 = abs( r1 - r2 );
if ( am1m2 < q38 ) goto ende;
if ( q37 > r1 ) goto ende;
schnittp = 1;
q38 = ( acos( q37 / r1 ) * 180 ) / pi;
xs1 = xm2 - xm1;
ys1 = ym2 - ym1;
if ( xs1 == 0 ) q39 = 90;
else q39 = ( atan( abs( ys1 ) / abs( xs1 ) ) * 180 ) / pi;
if ( !( xs1 > 0 ) && !( ys1 < 0 ) && !( ys1 == 0 ) ) q39 = 180 - q39;
if ( !( xs1 > 0 ) && !( xs1 == 0 ) && !( ys1 > 0 ) ) q39 = 180 + q39;
if ( !( xs1 < 0 ) && !( ys1 > 0 ) && !( ys1 == 0 ) ) q39 = 360 - q39;
am1m2 = ( (q39 - q38) / 180 ) * pi ;
xs1 = xm1 + cos( am1m2 ) * r1;
ys1 = ym1 + sin( am1m2 ) * r1;
am1m2 = ( (q39 + q38) / 180 ) * pi ;
xs2 = xm1 + cos( am1m2 ) * r1;
ys2 = ym1 + sin( am1m2 ) * r1;
ende:
if ( schnittp == 0 ) printf("\n\nErgebnis: keine Schnittpunkte der Kreise vorhanden");
else
{
if ( ( xs1 == xs2 ) && ( ys1 == ys2 ) ) printf("\n\nErgebnis: 1 Schnittpunkt vorhanden bei\nX%f Y%f",xs1,ys1);
else printf("\n\nErgebnis: 2 Schnittpunkte vorhanden bei\nX%f Y%f\nund bei\nX%f Y%f",xs1,ys1,xs2,ys2);
}
getch();
}
und es funktioniert

hab mir einfach mal 2 kreise schneiden lassen und es im acad nachgezeichnet. der hatte die gleichen werte.
dadurch das ich komplexere if funktionen erstellen konnte, wurde das programm auch fast alle sprungmarken los

nur um die letzte rauszubekommen, hätte ich break befehle anwenden müssen und die mag ich nicht

danke nochmal cooltyper für das basisprogramm
gruß
matthias
p.s.: die radiant degree umwandlung hab ich immer mit in die trigo funktionen/zeilen integriert ...