Inscription / Connexion Nouveau Sujet
Niveau terminale
Partager :

calcule d'un plan tangent à une sphère

Posté par
fabrice23
09-02-17 à 11:33

J'ai une sphère x^2+y^2+z^2=r^2 et un vecteur avec deux P=(x_1,y_1,z_1) et Q=(x_2,y_2,z_2),(x_1,y_1,z_1), je recherche le plan tangent à cette sphère qui contient les deux points P et Q. Bon on sait qu'il va y avoir deux solutions.

on va dire que  le point X(\alpha, \beta, \gamma) est le point tangent à la sphère.

Comme X appartient à la sphère il vérifie:

\alpha^2+\beta^2+\gamma^2=r^2.

de même le vecteur \vec{OX} sera le vecteur normal au plan tangent à la sphère. Le plan contient X donc l'équation du plan est

 \alpha(x-\alpha)+\beta(y-\beta)+\gamma(z-\gamma)=0

donc   \alpha x+\beta y+\gamma z=r^2

Le plan passe par P et Q  ce qui nous donne:

 
 \\ \alpha x_1+\beta y_1+\gamma z_1=r^2
 \\ \alpha x_2+\beta y_2+\gamma z_2=r^2
 \\

Il faut donc résoudre les trois équations:
 
 \\ \alpha x_1 +\beta y_1+\gamma z_1=r^2    (1)
 \\ \alpha x_2 +\beta y_2+\gamma z_2=r^2  (2)
 \\ \alpha^2+\beta^2+\gamma^2=r^2   (3)
 \\

A partir de  (1) :

\alpha = \frac {r^2 - \beta y_1 - \gamma z_1}{x_1} (4)

on réintroduit  $\alpha$  dans (2):

 \frac{x_2}{x_1}(r^2 - \beta y_1 - \gamma z_1) +\beta y_2+\gamma z_2=r^2

donc  \beta (y_2 - \frac{y_1 x_2}{x_1}) - \gamma ( \frac {z_1 x_2}{x_1} - z_2) = r^2 (1 - \frac{x_2}{x_1})

ou plus simplement

  \beta = A \gamma + B \ (5)

avec   A =  \frac{\frac{z_1 x_2}{x_1} - z_2} {y_2 - \frac{y_1 x_2}{x_1}}  et  \ B = \frac{r^2 (1 - \frac{x_2}{x_1})}{y_2 - \frac{y_1 x_2}{x_1}}  

On réintroduit  (5)  dans (4):

  \alpha = \frac{r^2 - (A \gamma + B) y_1 - \gamma z_1}{x_1}

  \alpha = \frac{\gamma (-A y_1 - z_1) + r^2 - B y_1}{x_1}

  \alpha = C \gamma + D (6) avec  C = \frac{-A y_1 - z_1}{x_1} and D = \frac{r^2 - B y_1}{x_1}  

Maintenant on utilise (5) et (6) dans (3):

  (C \gamma + D)^2 + (A \gamma + B)^2  +\gamma^2=r^2

  \gamma^2 (C^2 + A2 + 1) + \gamma (2CD +2AB) + D^2 + B^2 - r^2 = 0

On obtient une équation du second degré qui va nous donner deux valeurs pour  \gamma  et on utilise ces deux valeurs pour calculer  \beta  avec (5) et  \alpha  avec (6).

Malheureusement ca ne fonctionne pas car les valeurs calculées ne vérifient pas  \alpha^2 + \beta^2 + \gamma^2 = r^2 .Cela veut dire que j'ai du faire une erreur quelque part mais je ne sais pas où.... Alors si une bonne âme pouvait regarder  je lui en serais très reconnaissant

Posté par
carpediem
re : calcule d'un plan tangent à une sphère 09-02-17 à 11:53

salut

Citation :
 \frac{x_2}{x_1}(r^2 - \beta y_1 - \gamma z_1) +\beta y_2+\gamma z_2=r^2

donc  \beta (y_2 - \frac{y_1 x_2}{x_1}) - \gamma ( \frac {z_1 x_2}{x_1} - z_2) = r^2 (1 - \frac{x_2}{x_1})


déjà je multiplierai pas x_1 ce qui simplifie encore plus A et B ensuite ...

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 09-02-17 à 12:22

Bonjour, oui effectivement cela simplifiera A et B, merci. Par ailleurs voyez vous des erreurs dans la démarche? Merci bien

Posté par
carpediem
re : calcule d'un plan tangent à une sphère 09-02-17 à 13:03

à priori non je ne vois pas d'erreurs dans la démarche ... donc il faut reprendre les calculs littéraux ...

une remarque cependant si O (origine et centre de la sphère), P et Q sont alignés il n'y a pas de solution : (x_1, y_1, z_1) et (x_2, y_2, z_2) sont proportionnels

donc à un moment dans le calcul le pb doit apparaître ("genre une division par 0" par exemple)

Posté par
alb12
re : calcule d'un plan tangent à une sphère 09-02-17 à 16:46

salut,
Quel est le but final de ce probleme ?
Pour info voici le code latex de alpha qui refuse de s'afficher correctement:

\frac{(r^{2}-\frac{\mathrm{y1} (r^{2}\cdot \mathrm{x1}-r^{2}\cdot \mathrm{x2}-\frac{\mathrm{x1}\cdot \mathrm{z2} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})}+\frac{\mathrm{x2}\cdot \mathrm{z1} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})})}{(\mathrm{x1}\cdot \mathrm{y2}-\mathrm{x2}\cdot \mathrm{y1})}-\frac{\mathrm{z1} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})})}{\mathrm{x1}}

Posté par
carpediem
re : calcule d'un plan tangent à une sphère 09-02-17 à 17:07

Posté par
alb12
re : calcule d'un plan tangent à une sphère 09-02-17 à 17:43

on peut peut etre simplifier àla main
autrefois sur ce site on aurait afficher convenablement alpha
Maintenant c'est illisible
Vous pouvez essayer en mettant ce code entre les balises tex

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 09-02-17 à 18:40

Le problème original est décrit sur la figure qui doit être attaché à ce message. Il s'agit en fait d'un robot humanoïde avec un pied articulé et avec une jambe dont la cuisse fait un angle avec le "tibia" si je puis dire.
Le problème consiste à trouver l'inclinaison de la jambe plus celle des différentes articulations connaissant la position du bassin et du pied.
Une solution à ce problème consiste à voir une sphère centré sur le pivot du bassin  C et un plan passant par le point représentant la cheville  A de direction \vec U (l'inclinaison du pied) qui sera tangent à la sphère en T.
R représente une distance constante quelque soit la rotation de la cuisse par rapport au genou.
J'essaie de trouver une solution géométrique pour éviter de rentrer dans la résolution dites "cinématique inverse" via des matrices de rotation homogènes...
J'espère que j'ai clairement énoncé le problème?

calcule d\'un plan tangent à une sphère

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 09-02-17 à 18:48

J'ai mis toutes les équations entre balises Tex justement - et pour moi tout apparait comme il faut...

Posté par
carpediem
re : calcule d'un plan tangent à une sphère 09-02-17 à 19:57

alb12 @ 09-02-2017 à 17:43

on peut peut etre simplifier àla main
autrefois sur ce site on aurait afficher convenablement alpha
Maintenant c'est illisible
Vous pouvez essayer en mettant ce code entre les balises tex

normal faut des retours à la ligne ...

Posté par
alb12
re : calcule d'un plan tangent à une sphère 09-02-17 à 20:18

des retours ligne ? mais c'est une seule expression !
Sujet passionnant mais le calcul formel est-il indispensable ?
Des valeurs approchees ne suffisent-elles pas ?
Il suffit d'ecrire le programme de calcul

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 10-02-17 à 06:35

bonjour

programme de calcul? Je ne suis pas sur de bien saisir...  la résolution passe par des équations. Et j'ai l'impression que le raisonnement pour obtenir les 3 premières équations est juste mais je n'arrive pas trouver les 3 paramètres \alpha, \beta, \gamma.

Il doit y avoir une solution géométrique aussi je pense.

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 09:00

Par exemple avec le logiciel Xcas


EquationPlan(x1,y1,z1,x2,y2,z2,r):={
  eq1:=a*x1+b*y1+c*z1=r^2;
  eq2:=a*x2+b*y2+c*z2=r^2;
  eq3:=a^2+b^2+c^2=r^2;
  S:=solve([eq1,eq2,eq3],[a,b,c]);
  retourne S;
}:;


la commande:
EquationPlan(1,2,3,7,8,9,1)
renvoie:

 \\ \left(\begin{array}{ccc}
 \\ -\frac{1}{2} \cdot (\sqrt{3}+3)+\frac{1}{3} \cdot (2 (\sqrt{3}+3)-6)+1 & -\frac{1}{6} \cdot (2 (\sqrt{3}+3)-6) & \frac{1}{6} \cdot (\sqrt{3}+3) \\
 \\ \frac{1}{3} \cdot (2 (-\sqrt{3}+3)-6)-\frac{1}{2} \cdot (-\sqrt{3}+3)+1 & -\frac{1}{6} \cdot (2 (-\sqrt{3}+3)-6) & \frac{1}{6} \cdot (-\sqrt{3}+3)
 \\ \end{array}\right)
 \\

approx(EquationPlan(1,2,3,7,8,9,1)) renvoie:


 \\ \left(\begin{array}{ccc}
 \\ -0.211324865405 & -0.57735026919 & 0.788675134595 \\
 \\ -0.788675134595 & 0.57735026919 & 0.211324865405
 \\ \end{array}\right)
 \\

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 09:31

Pour avoir les equations des plans


EquationPlan(x1,y1,z1,x2,y2,z2,r):={
  eq1:=a*x1+b*y1+c*z1=r^2;
  eq2:=a*x2+b*y2+c*z2=r^2;
  eq3:=a^2+b^2+c^2=r^2;
  S:=solve([eq1,eq2,eq3],[a,b,c]);
  retourne [[S[0][0]*x+S[0][1]*y+S[0][2]*z=r^2],[S[1][0]*x+S[1][1]*y+S[1][2]*z=r^2]]
}:;


Par exemple
EquationPlan(1,2,5,6,8,10,2)
renvoie


 \\ \left(\begin{array}{c}
 \\ x (-\frac{5}{51} \cdot (\sqrt{118}+55)+\frac{1}{2} \cdot (\frac{20}{51} \cdot (\sqrt{118}+55)-20)+4)-\frac{1}{4} \cdot y (\frac{20}{51} \cdot (\sqrt{118}+55)-20)+\frac{1}{51} \cdot z (\sqrt{118}+55)=4 \\
 \\ x (\frac{1}{2} \cdot (\frac{20}{51} \cdot (-\sqrt{118}+55)-20)-\frac{5}{51} \cdot (-\sqrt{118}+55)+4)-\frac{1}{4} \cdot y (\frac{20}{51} \cdot (-\sqrt{118}+55)-20)+\frac{1}{51} \cdot z (-\sqrt{118}+55)=4
 \\ \end{array}\right)
 \\

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 10-02-17 à 09:59

Avec ce logiciel, effectivement ça marche!

Maintenant je ne comprends pas pourquoi je n'arrive pas à obtenir ce résultat à partir du calcul (nécessaire parce que je dois calculer ce plan de façon itérative en fonction du mouvement).  

Je ne vois pas mon (mes) erreur(s), ce qui est frustrant parce que c'est un système d'équations relativement simple quand même.

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 09:59

mon dernier post est à supprimer
confusion entre a,b,c et les coefficients du plan

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 10:09

A confirmer:


EquationsPlans(x1,y1,z1,x2,y2,z2,r):={
  A:=point(x1,y1,z1);
  B:=point(x2,y2,z2);
  eq1:=a*x1+b*y1+c*z1=r^2;
  eq2:=a*x2+b*y2+c*z2=r^2;
  eq3:=a^2+b^2+c^2=r^2;
  S:=solve([eq1,eq2,eq3],[a,b,c]);
  retourne equation(plan(A,B,S[0])),equation(plan(A,B,S[1]))
}:;

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 10:15


sphere(point(0,0,0),1);
A:=point(1,2,3);
B:=point(6,7,8);
plan(EquationsPlans(1,2,3,6,7,8,1)[0]);
plan(EquationsPlans(1,2,3,6,7,8,1)[1]);


donne bien me semble-t-il la sphere et les 2 plans tangents

Posté par
fabrice23
re : calcule d'un plan tangent à une sphère 10-02-17 à 10:39

Xcas montre bien qu'on peut trouver des solutions et je m'en réjouis mais je ne peux pas utiliser Xcas dans mon cas de figure. Hélas j'ai besoin de trouver les solutions par le calcul...  mais je n'y parviens pas.

Si je je trouve \beta en fonction de \gamma à l'aide des équations (1) et (2), normalement je peux réinjecter cette expression dans l'équation (1), par exemple, pour trouver \alpha qui sera fonction de \gamma?
Ensuite ayant \alpha et \beta fonction de \gamma, utiliser l'équation (3) pour calculer les 2 valeurs de \gamma?
la démarche est cohérente

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 11:18

alb12 @ 10-02-2017 à 09:59

mon dernier post est à supprimer
confusion entre a,b,c et les coefficients du plan

finalement c'etait correct

à premiere vue je ne vois pas d'erreur dans tes calculs
il faudrait les faire en meme temps sur Xcas avec tous les details pour trouver où est le probleme

Posté par
J-P Posteur d'énigmes
re : calcule d'un plan tangent à une sphère 10-02-17 à 12:49

En découpant là où certaines lignes de code Latex semblent hasardeuses ...

On obtient ceci pour le message Latex qui foire.

\frac{(r^{2}-\frac{\mathrm{y1} (r^{2}\cdot \mathrm{x1}-r^{2}\cdot \mathrm{x2}-\frac{\mathrm{x1}\cdot \mathrm{z2} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot

 \\ \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot
 \\  \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot 
 \\ \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot 
 \\ \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot 
 \\ \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot 
 \\ \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot 
 \\ \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot 
 \\ \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot 
 \\
\mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})}+\frac{\mathrm{x2}\cdot \mathrm{z1} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot



 \\ \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot 
 \\ \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot 
 \\ \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot 
 \\ \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot 
 \\ \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot 
 \\ \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot 
 \\
\mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})}+\frac{\mathrm{x2}\cdot
\mathrm{z1} (\sqrt{-r^{2}\cdot \mathrm{x1}^{2}-r^{2}\cdot \mathrm{x2}^{2}-
r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot

 \\ \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot 
 \\ \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot 
 \\ \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot 
 \\ \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot 
 \\ \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot 
 \\ \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot 
 \\ \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot 
 \\

\mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})})}{(\mathrm{x1}\cdot \mathrm{y2}-\mathrm{x2}\cdot \mathrm{y1})}-\frac{\mathrm{z1} (\sqrt{-r^{2}\cdot

 \\ \mathrm{x1}^{2}-r^{2}\cdot \mathrm{x2}^{2}-r^{2}\cdot \mathrm{y1}^{2}-r^{2}\cdot \mathrm{y2}^{2}-r^{2}\cdot \mathrm{z1}^{2}-r^{2}\cdot 
 \\ \mathrm{z2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot 
 \\ \mathrm{z1}^{2}+2\cdot r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}+2\cdot 
 \\ r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}+2\cdot r^{2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot \mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot 
 \\ \mathrm{z2}} |r\cdot \mathrm{x1}\cdot \mathrm{y2}-r\cdot \mathrm{x2}\cdot \mathrm{y1}|+r^{2}\cdot \mathrm{x1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{x2}^{2}\cdot \mathrm{z1}+r^{2}\cdot \mathrm{y1}^{2}\cdot \mathrm{z2}+r^{2}\cdot \mathrm{y2}^{2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}-r^{2}\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z2}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot 
 \\ \mathrm{z1}-r^{2}\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z2})}{(\mathrm{x1}^{2}\cdot \mathrm{y2}^{2}+\mathrm{x1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{x2}^{2}\cdot \mathrm{y1}^{2}+\mathrm{x2}^{2}\cdot \mathrm{z1}^{2}+\mathrm{y1}^{2}\cdot \mathrm{z2}^{2}+\mathrm{y2}^{2}\cdot 
 \\ \mathrm{z1}^{2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{y1}\cdot \mathrm{y2}-2\cdot \mathrm{x1}\cdot \mathrm{x2}\cdot \mathrm{z1}\cdot 
 \\
\mathrm{z2}-2\cdot \mathrm{y1}\cdot \mathrm{y2}\cdot \mathrm{z1}\cdot \mathrm{z2})})}{\mathrm{x1}}

Cela devrait permettre de corriger les bugs plus facilement.

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 12:53

le pb c'est qu'il y a une enorme racine carree
ll suffit d'utiliser Xcas pour avoir un affichage correct
je vais essayer de calculer comme fabrice23 mais avec Xcas

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 14:41

tes calculs sont exacts du debut à la fin
la resolution de ta derniere equation donne les bons resultats pour c ie gamma pour toi

le script Xcas de verif:

eq1:=a*x1+b*y1+c*z1=r^2;
  eq2:=a*x2+b*y2+c*z2=r^2;
  eq3:=a^2+b^2+c^2=r^2;
eq4:=solve(eq1,a)
S1:=solve(subst(eq2,a=(r^2-b*y1-c*z1)/x1),b)
A,B:=coeff(S1[0],c)//ok
S2:=(r^2-('A'*c+'B')*y1-c*z1)/x1
C,D:=coeff((-y1*('A'*c+'B')+r^2-c*z1)/x1,c)
S3:=('C'*c+'D')^2+('A'*c+'B')^2+c^2-r^2
coeff(c^2-r^2+('A'*c+'B')^2+('C'*c+'D')^2,c)
solve(c^2-r^2+(A*c+B)^2+(C*c+D)^2,c)
x1,y1,z1,x2,y2,z2,r:=1,2,3,7,8,9,1 // verif sur un exemple
solve(c^2-r^2+(A*c+B)^2+(C*c+D)^2,c)

la derniere commande renvoie:


 \\ \{\frac{1}{6} \cdot (-\sqrt{3}+3),\frac{1}{6} \cdot (\sqrt{3}+3)\}
 \\

confirmes par les programmes que j'ai indiques precedemment

conclusion:
tu as mal resolu ton equation en gamma

Posté par
alb12
re : calcule d'un plan tangent à une sphère 10-02-17 à 17:54

fabrice23 @ 09-02-2017 à 18:48

J'ai mis toutes les équations entre balises Tex justement - et pour moi tout apparait comme il faut...


tu veux dire en aperçu sur ce site ?
chez moi j'ai une image tellement reduite qu'on ne voit rien



Vous devez être membre accéder à ce service...

Pas encore inscrit ?

1 compte par personne, multi-compte interdit !

Ou identifiez-vous :


Rester sur la page

Inscription gratuite

Fiches en rapport

parmi 1741 fiches de maths

Désolé, votre version d'Internet Explorer est plus que périmée ! Merci de le mettre à jour ou de télécharger Firefox ou Google Chrome pour utiliser le site. Votre ordinateur vous remerciera !