2020年6月2日火曜日

数学 - Python - 立体的な広がりの中の図形 - 空間図形 - 直線・平面・球の方程式 - 平面の方程式 - 法線ベクトル、平行、垂直

1. $\begin{array}{l}2\left(x+3\right)+4\left(y-1\right)-5\left(x-2\right)=0\\ 2x+4y-5x=-12\end{array}$

2. $x=5$

3. $y=3$

4. $\begin{array}{l}2x-3y+z=\left(2,-3,1\right)·\left(5,3,-1\right)\\ 2x-3y+z=10-9-1\\ 2x-3y+z=0\end{array}$

5. $\begin{array}{l}x=2+s+2t\\ y=-1-s+3t\\ z=-3+s-t\end{array}$
$\begin{array}{l}x+y=1+5t\\ x-z=5+3t\end{array}$
$\begin{array}{l}3x+3y=3+15t\\ 5x-5z=25+15t\end{array}$
$2x-3y-5z=22$

6. $\begin{array}{l}d=0\\ a-c+d=0\\ 2b+3c+d=0\end{array}$
$\begin{array}{l}a-c=0\\ 2b+3c=0\end{array}$
$\begin{array}{l}c=a\\ b=-\frac{3}{2}a\end{array}$
$2x-3y+2z=0$

7. $\begin{array}{l}x=3-2s\\ y=4-4t\\ z=-1+6s+6t\end{array}$
$\begin{array}{l}s=\frac{3-x}{2}\\ t=\frac{4-y}{4}\end{array}$
$\begin{array}{l}z=-1+9-3x+\frac{12-3y}{2}\\ 6x+3y+2z=28\end{array}$

8. $\begin{array}{l}\left(1,-2,-1\right)\\ \left(2,0,2\right)\end{array}$

は直線上の2点。

$\begin{array}{l}x=s+2t\\ y=-2s\\ z=-s+2t\end{array}$
$\begin{array}{l}x-z=2s\\ x-z=-y\\ x+y-z=0\end{array}$

9. $\begin{array}{l}x=1+t\\ y=-1-s+t\\ z=2-3s\end{array}$
$\begin{array}{l}x-y=2+s\\ s=x-y-2\end{array}$
$\begin{array}{l}z=2-3x+3y+6\\ 3x-3y+z=8\end{array}$

10. $\begin{array}{l}2a+5b+3c=0\\ 3a+6b+4c=0\end{array}$
$\begin{array}{l}6a+15b+9c=0\\ 6a+12b+8c=0\end{array}$
$\begin{array}{l}3b+c=0\\ c=-3b\end{array}$
$\begin{array}{l}2a+5b-9b=0\\ a=2b\end{array}$

求める平面の法線ベクトルの1つは

$\left(2,1,-3\right)$
$\begin{array}{l}2+3+6+d=0\\ d=-11\end{array}$
$2x+y-3z=11$

11. $\begin{array}{l}2a+3b+c=0\\ c=-2a-3b\end{array}$

法線ベクトルの1つは

$\left(1,b,-2-3b\right)$
$\begin{array}{l}2b+8+12b+d=0\\ 1+d=0\end{array}$
$\begin{array}{l}d=-1\\ 2b+8+12b-1=0\\ b=-\frac{1}{2}\end{array}$
$\begin{array}{l}x-\frac{1}{2}y+\left(-2+\frac{3}{2}\right)z-1=0\\ 2x-y-z=2\end{array}$

コード

#!/usr/bin/env python3
from sympy.abc import x, y
from sympy.plotting import plot3d

print('28.')

p = plot3d(-(x - y),
2 * x + 3 * y - 4,
(2 * x - 3 * y - 22) / 5,
show=True)
p.save('sample28.png')


% ./sample28.py
28.
%