Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 99
Kernel: SageMath 8.0
%display latex axes = plot(vector([1,0,0]),color='black',thickness="2")+plot(vector([0,1,0]),color='black',thickness="2")+plot(vector([0,0,1]),color='black',thickness="2") latex.matrix_delimiters('[',']')

EXEMPLE 1

Commencons avec deux points P=(2,3,0)P = (2,3,0) et Q=(1,2,1)Q = (1,-2,1)

OP = vector([2,3,0]) OQ = vector([1,-2,1]) X = plot(OP,thickness="5") + plot(OQ,thickness="5") + axes X
MIME type unknown not supported

On a vu que le vecteur direction D=OQOP\overrightarrow{D} = \overrightarrow{OQ} - \overrightarrow{OP} de ΔPQ\Delta_{PQ} est donné par [D]B=[122310]=[151][\overrightarrow{D}]_B = \begin{bmatrix}1-2\\-2-3\\1-0\end{bmatrix} = \begin{bmatrix}-1\\-5\\1\end{bmatrix}

Et que le ligne est crée comme:

x=2t,y=35t,z=tx = 2 - t, \qquad y=3-5t, \qquad z = t

Donc, on aura

droite = [OP[0] + (OQ[0]-OP[0])*x,OP[1] + (OQ[1]-OP[1])*x,OP[2] + (OQ[2]-OP[2])*x] X + parametric_plot3d(droite, (-2,1),thickness="5",color="red")
MIME type unknown not supported

En utilisant ça, on peut voir si une pointe est sur la ligne ou pas. Prennons R=(7,28,5)R = (7,28,-5).

Avec la première équation, on voit que t=5t = -5. Si on substitut t=5t = -5 partout, on voit que ça marche! Donc il faudra que RR est sur la droite.

plot(point3d((7,28,-5),size=20,color="red")) + X + parametric_plot3d(droite, (-5,1),thickness="5",color="purple")
MIME type unknown not supported

Essayons avec S=(3,0,4)S = (3,0,4). On peut voir que pour la première équation on aurais t=1t = -1 mais pour la troisième, t=4t = 4. Donc SS n'est pas sur notre droite!

plot(point3d((3,0,4),size=20,color="red")) + X + parametric_plot3d(droite, (-2,1),thickness="5",color="purple")
MIME type unknown not supported

On peut décrire ces équations sans le tt

xx1x2x1=yy1y2y1=zz1z2z1\frac{x - x_1}{x_2 - x_1} = \frac{y-y_1}{y_2 - y_1} = \frac{z - z_1}{z_2 - z_1}

Ça se donne une droite comme l'intersection de deux plans. Par exemple, si on prend celui d'avant, on aura

x21=y35=z1\frac{x - 2}{-1} = \frac{y-3}{-5} = \frac{z}{1}

ou encore

x2=zety35=zx-2 = -z \qquad \text{et} \qquad \frac{y-3}{5} = -z
t = var('t') parametric_plot3d([2-t,-5*t+3,t],(t,-2,1),color="blue", thickness="11")+ parametric_plot3d(droite, (-2,1),color="red", thickness="10")
MIME type unknown not supported

EXEMPLE 2

Commencons avec trois points P=(2,3,0)P = (2,3,0), Q=(1,2,1)Q = (1,-2,1), R=(4,1,1)R = (4,1,-1)

OP = vector([2,3,0]) OQ = vector([1,-2,1]) OR = vector([4,1,-1]) X = plot(OP,thickness="5") + plot(OQ,thickness="5") +plot(OR,thickness="5") + axes X
MIME type unknown not supported

On a vu que les vecteurs directeurs D1\overrightarrow{D_1} et D2\overrightarrow{D_2} sont donné par

[D1]B=[122310]=[151][D2]B=[421310]=[221][\overrightarrow{D_1}]_B = \begin{bmatrix}1-2\\-2 - 3\\ 1-0\end{bmatrix} = \begin{bmatrix}-1\\ -5\\ 1\end{bmatrix} \quad [\overrightarrow{D_2}]_B = \begin{bmatrix}4-2\\1 - 3\\-1 -0\end{bmatrix} = \begin{bmatrix}2\\ -2\\ -1\end{bmatrix}

Et que le plan est crée comme:

x=2u+2v,y=35u2v,z=uvx = 2 - u + 2v, \qquad y=3 -5u - 2v, \qquad z = u - v

Donc, on aura

u,v = var('u','v') droite = [OP[0] + (OQ[0]-OP[0])*u + (OR[0]-OP[0])*v,OP[1] + (OQ[1]-OP[1])*u+ (OR[1]-OP[1])*v,OP[2] + (OQ[2]-OP[2])*u+ (OR[2]-OP[2])*v] X + parametric_plot3d(droite, (u,-2,1), (v,-2,1))
MIME type unknown not supported

En utilisant ça, on peut voir si une pointe est sur la ligne ou pas. Prennons S=(13,22,8)S = (13,22,-8).

On aura donc

13=2u+2v,22=35u2v,8=uv13 = 2 - u + 2v, \qquad 22=3 -5u - 2v, \qquad -8 = u - v

C'est une sytéme d'équations linéaires!!! Donc on aura

[125211][uv]=[11198]\begin{bmatrix}-1 & 2 \\ -5 & -2 \\ 1 & -1\end{bmatrix} \begin{bmatrix}u\\ v\end{bmatrix} = \begin{bmatrix}11 \\ 19 \\ -8\end{bmatrix}
M = matrix([[-1,2,11],[-5,-2,19],[1,-1,-8]]);M
M.rref()

Donc il existe une suele solution : u=5etv=3 u = -5 \quad\text{et}\quad v = 3

plot(point3d((13,22,-8),size=20,color="red")) + X + parametric_plot3d(droite, (-5,1), (-2,3))
/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/plot/plot3d/parametric_plot3d.py:1123: DeprecationWarning: Unnamed ranges for more than one variable is deprecated and will be removed from a future release of Sage; you can used named ranges instead, like (x,0,2) See http://trac.sagemath.org/7008 for details. g, ranges = setup_for_eval_on_grid(f, [urange, vrange], plot_points)
MIME type unknown not supported

Essayons avec O=(0,0,0)O = (0,0,0).

On aura

0=2u+2v,0=35u2v,0=uv0 = 2 - u + 2v, \qquad 0=3 - 5u - 2v, \qquad 0 = u - v

C'est une sytéme d'équations linéaires!!! Donc on aura

[125211][uv]=[230]\begin{bmatrix}-1 & 2 \\ -5 & -2 \\ 1 & -1\end{bmatrix} \begin{bmatrix}u\\ v\end{bmatrix} = \begin{bmatrix}-2 \\ -3 \\ 0\end{bmatrix}
M = matrix([[-1,2],[-5,-2],[1,-1]]).augment(matrix([[-2,-3,0]]).transpose(), subdivide=True);M
M.rref()

Donc, il n'y a aucune solution! =D

plot(point3d((0,0,0),size=20,color="red")) + X + parametric_plot3d(droite, (-2,1), (-2,1))
MIME type unknown not supported