空間座標系的建立與點座標
Author: 藍邦偉  老師

x

y

z

顯示單位向量

x

y

z

x1

y1

z1

點P(

,

,

)

x軸

y軸

z軸

xy平面

yz平面

zx平面

x

y

z

$ O $

A: (x((Corner[3] + 39 * Corner[4]) / 40), y((Corner[1] + 9 * Corner[4]) / 10))
B: (x((4 * Corner[3] + 16 * Corner[4]) / 20), y((Corner[1] + 9 * Corner[4]) / 10))
a = Segment(A, B)
C: (3 * A + B) / 4
D: (3 * B + A) / 4
E = Point(a)
c = Circle(C, E)
c' = Translate(c, Vector[C, D])
A' = Rotate(A, 270*°, C)
B' = Rotate(B, 270*°, C)
a' = Segment(A', B')
c'' = Rotate(c', 270*°, C)
D' = Rotate(D, 270*°, C)
E' = Rotate(Translate[E, Vector[C, D]], 90*°, D)
E'' = Rotate(E', 270*°, C)
F = Point(c'')
G = Point(c')
α = Angle(E'', D', F)
b = Segment(D', F)
d = Segment(D, G)
β = Angle(G, D, E')
I: C + (b * cos(α), b * sin(α) * sin(β))
J: C + (b * cos(α + 90°), b * sin(α + 90°) * sin(β))
K: C + (0, b * cos(β))
e = Segment(C, K)
f = Segment(C, I)
g = Segment(C, J)
O = (9.770545197110689, -5.66764656081895)
I' = Translate(I, Vector[C, O])
J' = Translate(J, Vector[C, O])
K' = Translate(K, Vector[C, O])
L = 7 (slider from 1 to 10, step 1)
I'' = Dilate(I', L, O)
J'' = Dilate(J', L, O)
K'' = Dilate(K', L, O)
I''' = Dilate(I'', -1, O)
J''' = Dilate(J'', -1, O)
K''' = Dilate(K'', -1, O)
u' = Vector(I''', I'')
v' = Vector(J''', J'')
w' = Vector(K''', K'')
h = Segment(D', E'')
i = Segment(D, E')
軌跡1 = Locus(I, F)
L_{axis}: L
w = Vector(O, K')
u = Vector(O, I')
v = Vector(O, J')
k = false
x1 = 0 (slider from -8 to 8, step 1)
y1 = 0 (slider from -8 to 8, step 1)
z1 = 0 (slider from -8 to 8, step 1)
P: O + x1 * u + y1 * v + z1 * w
P_1: O + x1 * u
P_2: O + y1 * v
P_3: O + z1 * w
P_4: O + x1 * u + y1 * v
P_5: O + y1 * v + z1 * w
P_6: O + x1 * u + z1 * w
inputBox1 = Textfield(x1)
inputBox2 = Textfield(y1)
inputBox3 = Textfield(z1)
m, n = SDLine(P, P_4, P_6, P_5)
p, q = SDLine(P_6, P, P_1, P_3)
r, s = SDLine(P_5, P, P_3, P_2)
t_2, a_1 = SDLine(P_5, P_2, P, P_3)
b_1, c_1 = SDLine(P_5, P_3, P_2, P)
d_1, e_1 = SDLine(P_3, O, P_5, P_6)
f_1, g_1 = SDLine(P_3, P_6, O, P_5)
h_1, i_1 = SDLine(P_6, P_1, P_3, P)
j_1, k_1 = SDLine(P_4, P_1, P, P_2)
l_1, m_1 = SDLine(P_2, P_4, P_5, O)
n_1, p_1 = SDLine(P_1, O, P_6, P_4)
q_1, r_1 = SDLine(P_2, O, P_4, P_5)
t1 = 0 (slider from 0 to 1, step 0.01)
t2 = 0 (slider from 0 to 1, step 0.01)
t6 = 0 (slider from 0 to 1, step 0.01)
t3 = 0 (slider from 0 to 1, step 0.01)
t4 = 0 (slider from 0 to 1, step 0.01)
t5 = 0 (slider from 0 to 1, step 0.01)
U_{+x}: O + t1 * Vector[O, I'']
U_{-z}: O + t3 * Vector[O, K''']
U_{-y}: O + t2 * Vector[O, J''']
U_{+z}: O + t3 * Vector[O, K'']
U_{+y}: O + t2 * Vector[O, J'']
U_{-x}: O + t1 * Vector[O, I''']
s_1 = Segment(O, U_{-y})
u_1 = Vector(O, U_{+y})
z = Vector(O, U_{+x})
l = Segment(O, U_{-x})
v_1 = Vector(O, U_{+z})
t_1 = Segment(O, U_{-z})
A_1: O + L * u + L * v
A_2: O - L * u + L * v
A_3: O - L * u - L * v
A_4: O + L * u - L * v
B_1: O + t4 * Vector[O, A_1]
B_2: O - t4 * Vector[O, A_1]
B_3: O + t4 * Vector[O, A_2]
B_4: O - t4 * Vector[O, A_2]
poly4, a_2, a_3, a_4, a_5 = Polygon(A_1, A_2, A_3, A_4)
j = Vector(O, B_1)
w_1 = Vector(O, B_2)
z_1 = Vector(O, B_3)
u_2 = Vector(O, B_4)
C_1: O + L * w + L * v
C_2: O + L * w - L * v
D_1: O + t5 * Vector[O, C_1]
D_2: O + t5 * Vector[O, C_2]
D_3: O - t5 * Vector[O, C_1]
D_4: O - t5 * Vector[O, C_2]
v_2 = Vector(O, D_1)
w_2 = Vector(O, D_2)
z_2 = Vector(O, D_3)
b_2 = Vector(O, D_4)
C_4: O - L * w + L * v
C_3: O - L * w - L * v
poly5, c_2, c_3, c_4, c_5 = Polygon(C_1, C_2, C_3, C_4)
E_1: O + L * u + L * w
E_2: O - L * u + L * w
E_3: O - L * u - L * w
E_4: O + L * u - L * w
F_1: O + t6 * Vector[O, E_1]
F_2: O + t6 * Vector[O, E_2]
F_3: O - t6 * Vector[O, E_1]
F_4: O - t6 * Vector[O, E_2]
d_2 = Vector(O, F_1)
e_2 = Vector(O, F_2)
f_2 = Vector(O, F_3)
g_2 = Vector(O, F_4)
poly6, e_3, e_4, e_5, e_6 = Polygon(E_1, E_2, E_3, E_4)
t_P: "P(" + (LaTeX[x1]) + "," + (LaTeX[y1]) + "," + (LaTeX[z1]) + ")"
t_a: 10 * t1 - 1
t_b: 10 * t2 - 1
t_c: 10 * t3 - 1
list_2 = Sequence(O - k * u, k, 1, t_a - 2)
list_1 = Sequence(O + k * u, k, 1, t_a - 3)
list_3 = Sequence(O + k * v, k, 1, t_b - 3)
list_4 = Sequence(O - k * v, k, 1, t_b - 2)
list_5 = Sequence(O + k * w, k, 1, t_c - 3)
list_6 = Sequence(O - k * w, k, 1, t_c - 2)

Tool: SDLine
Input: A, B, C, D
Output: g, h

b: sgn(sin(Angle[D, B, A]))
a: sgn(sin(Angle[A, B, C]))
c: sgn(a + b + 0.5)
d: sqrt(c)
e: sqrt(-c)
E = Midpoint(A, B)
A' = Dilate(A, d, E)
B' = Dilate(B, d, E)
g = Segment(A', B')
A'_1 = Dilate(A, e, E)
B'_1 = Dilate(B, e, E)
h = Segment(A'_1, B'_1)

Tool: Poly_G4
Input: A, B, C, D
Output: poly1'

α = Angle(C, B, A)
a: sqrt(sgn(sin(α)))
A' = Dilate(A, a, B)
B' = Dilate(B, a, B)
C' = Dilate(C, a, B)
D' = Dilate(D, a, B)
poly1', a', b', c', d' = Polygon(A', B', C', D')

Tool: Poly_B4
Input: A, B, C, D
Output: poly1'

α = Angle(C, B, A)
a: sqrt(sgn(sin(α)))
A' = Dilate(A, a, B)
B' = Dilate(B, a, B)
C' = Dilate(C, a, B)
D' = Dilate(D, a, B)
poly1', a', b', c', d' = Polygon(A', B', C', D')

Tool: Poly_R4
Input: A, B, C, D
Output: poly1'

α = Angle(C, B, A)
a: sqrt(sgn(sin(α)))
A' = Dilate(A, a, B)
B' = Dilate(B, a, B)
C' = Dilate(C, a, B)
D' = Dilate(D, a, B)
poly1', a', b', c', d' = Polygon(A', B', C', D')

Tool: Poly_Y4
Input: A, B, C, D
Output: poly1

poly1 = Poly_R4(A, B, C, D)

Tool: Poly_R4 (command Poly_R41)
Input: A, B, C, D
Output: poly1'

α = Angle(C, B, A)
a: sqrt(sgn(sin(α)))
A' = Dilate(A, a, B)
B' = Dilate(B, a, B)
C' = Dilate(C, a, B)
D' = Dilate(D, a, B)
poly1', a', b', c', d' = Polygon(A', B', C', D')

Tool: Poly_C4
Input: A, B, C, D
Output: poly1

poly1 = Poly_R4(A, B, C, D)