直線的點斜式
Author: 藍邦偉  老師
Date: 15 1 月 2013

$m=%v$

$A$

$ 點斜式 $
$通過P\;(x_0,y_0)且斜率為\;m\;的直線$
$方程式為L:y-y_0=m(x-x_0)$

$設P(x,y)在L上，\; 又m_{\overline{PA}}=m$
$⇒m=\frac{x-x_0}{y-y_0}$
$⇒y-y_0=m(x-x_0)$

f(x) = 2 * sin(x) + cos(2 * x) + 2
m = 2.6 (slider from -20 to 20, step 0.1)
A_0 = (3.6341325780500844, 4.1070586222273695)
A = DynamicCoordinates(A_0, floor(x(A_0)), floor(y(A_0)))
L: y - y(A) = m * (x - x(A))
Q_2: 0.67 * Corner[1] + 0.33 * Corner[2]
Q_3: (x(Q_2), y(Corner[4]))
poly1, a, q_2, q_3, b = Polygon(Corner[1], Q_2, Q_3, Corner[4])
h: x(A)
k: y(A)
text2: "$ 通過A" + (LaTeX[A]) + " 且斜率為" + (LaTeX[FractionText[m]]) + "\;的直線方$
$程式為L:y" + (LaTeX[If[k ≟ 0, "", If[k > 0, "-" + k, "+" + (-k)]]]) + "=" + (LaTeX[FractionText[m]]) + "" + (LaTeX[If[h ≟ 0, "x", "(x"]]) + "" + (LaTeX[If[h > 0, "-" + h + ")", If[h < 0, "+" + (-h) + ")"]]]) + "$"