Author: 藍邦偉　老師
Date: 24 3 月 2013

$β=%v$

$α=%v$

x

y

z

$ O $

$level=%v$

a1

b1

c1

a2

c2

b2

a3

b3

c3

a4

b4

c4

$P$

$輸入投影點座標：$
$\;$
$(\;\;\;\;\;\;\;\;\;,\;\;\;\;\;\;\;\;\;,\;\;\;\;\;\;\;\;\;)$
$\;\;$
$輸入對稱點座標：$
$\;$
$(\;\;\;\;\;\;\;\;\;,\;\;\;\;\;\;\;\;\;,\;\;\;\;\;\;\;\;\;)$

投影點與對稱點

a4 = 0 (slider from -5 to 5, step 1)
O = (11.106606455254273, 4.5300485719424755)
z_0 = Random(-5, 4)
y_0 = Random(-5, 4)
x_0 = Random(-5, 4)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 3.895574890451343 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
L = 5 (slider from 1 to 10, step 1)
yy = Vector(O - L * v, O + L * v)
zz = Vector(O - L * w, O + L * w)
xx = Vector(O - L * u, O + L * u)
Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
poly1, h, q_1, q_4, i = Polygon(Corner[1], Q_2, Q_3, Corner[4])
x_1 = Random(1, 5)
y_1 = Random(1, 5)
x_2 = If(x_0 ≟ 0, 5, x_0)
y_2 = If(y_0 ≟ 0, 5, y_0)
z_2 = If(z_0 ≟ 0, 5, z_0)
z_1 = Random(1, 5)
a1 = 0 (slider from -5 to 5, step 1)
b1 = 0 (slider from -5 to 5, step 1)
c1 = 0 (slider from -5 to 5, step 1)
a2 = 0 (slider from -5 to 5, step 1)
b2 = 0 (slider from -5 to 5, step 1)
c2 = 0 (slider from -5 to 5, step 1)
s = 4 (slider from 1 to 6, step 1)
level = 1 (slider from 1 to 2, step 1)
a3 = 0 (slider from -5 to 5, step 1)
b3 = 0 (slider from -5 to 5, step 1)
b4 = 0 (slider from -5 to 5, step 1)
c4 = 0 (slider from -5 to 5, step 1)
i01 = Textfield(a1)
i02 = Textfield(b1)
i03 = Textfield(c1)
i04 = Textfield(a2)
i06 = Textfield(c2)
i05 = Textfield(b2)
i07 = Textfield(a3)
i08 = Textfield(b3)
c3 = 0
i09 = Textfield(c3)
i10 = Textfield(a4)
i11 = Textfield(b4)
i12 = Textfield(c4)
Plane_{xy}, a, b, c, d = Polygon(O + L * u + L * v, O - L * u + L * v, O - L * u - L * v, O + L * u - L * v)
Plane_{yz}, e, f, j, k = Polygon(O + L * w + L * v, O - L * w + L * v, O - L * w - L * v, O + L * w - L * v)
Plane_{zx}, l, m, n, p = Polygon(O + L * w + L * u, O - L * w + L * u, O - L * w - L * u, O + L * w - L * u)
P = If(level ≟ 1, O + x_1 * u + y_1 * v + z_1 * w, If[level ≟ 2, O + x_2 * u + y_2 * v + z_2 * w])
a_1 = Segment(O + x_1 * u, O + x_1 * u + z_1 * w)
a_2 = Segment(O + x_1 * u + y_1 * v, O + x_1 * u + y_1 * v + z_1 * w)
a_3 = Segment(O + y_1 * v, O + y_1 * v + z_1 * w)
a_4 = Segment(O + x_1 * u, O + y_1 * v + x_1 * u)
a_5 = Segment(O + x_1 * u + y_1 * v, O + y_1 * v)
a_6 = Segment(O + x_1 * u + y_1 * v + z_1 * w, O + z_1 * w + y_1 * v)
a_7 = Segment(O + x_1 * u + z_1 * w, O + z_1 * w)
a_8 = Segment(O + x_1 * u + z_1 * w, O + x_1 * u + y_1 * v + z_1 * w)
a_9 = Segment(O + z_1 * w, O + y_1 * v + z_1 * w)
a_{10} = Segment(O + x_1 * u, O)
a_{11} = Segment(O, O + z_1 * w)
b_0 = Segment(O + x_2 * u, O + x_2 * u + z_2 * w)
b_1 = Segment(O + x_2 * u + y_2 * v, O + y_2 * v + x_2 * u + z_2 * w)
b_2 = Segment(O + y_2 * v, O + y_2 * v + z_2 * w)
b_3 = Segment(O, O + z_2 * w)
b_4 = Segment(O + x_2 * u, O + x_2 * u + y_2 * v)
b_5 = Segment(O + x_2 * u + z_2 * w, O + x_2 * u + y_2 * v + z_2 * w)
b_6 = Segment(O + z_2 * w, O + y_2 * v + z_2 * w)
b_7 = Segment(O + z_2 * w, O + x_2 * u + z_2 * w)
b_8 = Segment(O + y_2 * v + z_2 * w, O + x_2 * u + y_2 * v + z_2 * w)
b_9 = Segment(O + y_2 * v, O + x_2 * u + y_2 * v)
b_{10} = Segment(O, O + x_2 * u)
b_{11} = Segment(O, O + y_2 * v)
a_0 = Segment(O, O + y_1 * v)
text1: "$試求點P(" + (LaTeX[If[level ≟ 1, "" + x_1 + "," + y_1 + "," + z_1, "" + x_2 + "," + y_2 + "," + z_2]]) + ")對" + (LaTeX[If[s ≟ 1, "xy平面", If[s ≟ 2, "yz平面", If[s ≟ 3, "zx平面", If[s ≟ 4, "x軸", If[s ≟ 5, "y軸", "z軸"]]]]]]) + "的$
$投影點座標為$
$對稱點座標為$"
text3: "$(" + (LaTeX[If[level ≟ 1, a1, a3]]) + "," + (LaTeX[If[level ≟ 1, b1, b3]]) + "," + (LaTeX[If[level ≟ 1, c1, c3]]) + ")$
$(" + (LaTeX[If[level ≟ 1, a2, a4]]) + "," + (LaTeX[If[level ≟ 1, b2, b4]]) + "," + (LaTeX[If[level ≟ 1, c2, c4]]) + ")$"
text2: "" + (LaTeX[If[level ≟ 1 ∧ s ≟ 1 ∧ a1 ≟ x_1 ∧ b1 ≟ y_1 ∧ c1 ≟ 0 ∧ a2 ≟ x_1 ∧ b2 ≟ y_1 ∧ c2 ≟ -z_1 ∨ level ≟ 1 ∧ s ≟ 2 ∧ a1 ≟ 0 ∧ b1 ≟ y_1 ∧ c1 ≟ z_1 ∧ a2 ≟ -x_1 ∧ b2 ≟ y_1 ∧ c2 ≟ z_1 ∨ level ≟ 1 ∧ s ≟ 3 ∧ a1 ≟ x_1 ∧ b1 ≟ 0 ∧ c1 ≟ z_1 ∧ a2 ≟ x_1 ∧ b2 ≟ -y_1 ∧ c2 ≟ z_1 ∨ level ≟ 1 ∧ s ≟ 4 ∧ a1 ≟ x_1 ∧ b1 ≟ 0 ∧ c1 ≟ 0 ∧ a2 ≟ x_1 ∧ b2 ≟ -y_1 ∧ c2 ≟ -z_1 ∨ level ≟ 1 ∧ s ≟ 5 ∧ a1 ≟ 0 ∧ b1 ≟ y_1 ∧ c1 ≟ 0 ∧ a2 ≟ -x_1 ∧ b2 ≟ y_1 ∧ c2 ≟ -z_1 ∨ level ≟ 1 ∧ s ≟ 6 ∧ a1 ≟ 0 ∧ b1 ≟ 0 ∧ c1 ≟ z_1 ∧ a2 ≟ -x_1 ∧ b2 ≟ -y_1 ∧ c2 ≟ z_1 ∨ level ≟ 2 ∧ s ≟ 1 ∧ a3 ≟ x_2 ∧ b3 ≟ y_2 ∧ c3 ≟ 0 ∧ a4 ≟ x_2 ∧ b4 ≟ y_2 ∧ c4 ≟ -z_2 ∨ level ≟ 2 ∧ s ≟ 2 ∧ a3 ≟ 0 ∧ b3 ≟ y_2 ∧ c3 ≟ z_2 ∧ a4 ≟ -x_2 ∧ b4 ≟ y_2 ∧ c4 ≟ z_2 ∨ level ≟ 2 ∧ s ≟ 3 ∧ a3 ≟ x_2 ∧ b3 ≟ 0 ∧ c3 ≟ z_2 ∧ a4 ≟ x_2 ∧ b4 ≟ -y_2 ∧ c4 ≟ z_2 ∨ level ≟ 2 ∧ s ≟ 4 ∧ a3 ≟ x_2 ∧ b3 ≟ 0 ∧ c3 ≟ 0 ∧ a4 ≟ x_2 ∧ b4 ≟ -y_2 ∧ c4 ≟ -z_2 ∨ level ≟ 2 ∧ s ≟ 5 ∧ a3 ≟ 0 ∧ b3 ≟ y_2 ∧ c3 ≟ 0 ∧ a4 ≟ -x_2 ∧ b4 ≟ y_2 ∧ c4 ≟ -z_2 ∨ level ≟ 2 ∧ s ≟ 6 ∧ a3 ≟ 0 ∧ b3 ≟ 0 ∧ c3 ≟ z_2 ∧ a4 ≟ -x_2 ∧ b4 ≟ -y_2 ∧ c4 ≟ z_2, "Correct\;!", "Try\;Again\;!"]]) + ""