空間中的直線與平面
Author: 藍邦偉  老師

x

y

z

單位向量

座標軸

Step 1

Step 2

Step 3

直線與平面的關係

Step 4

α = 4.014257279586958 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (8.928096116804236, 5.393313825657669)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
L = 5 (slider from 1 to 10, step 1)
a = Vector(O - L * v, O + L * v)
b = Vector(O - L * w, O + L * w)
z = Vector(O - L * u, O + L * u)
A_1: O + L * u
B_1: O + L * v
Z: O + L * w
c = false
d = false
Q_2: 0.2 * Corner[2] + 0.8 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
多邊形1, e, q_2, q_3, f = Polygon(Corner[1], Q_2, Q_3, Corner[4])
g = Segment(Q_2, Q_3)
A1: O + 5 * u + 4 * v + 2 * w
A2: O + 5 * u + 4 * v - 2 * w
A3: O + 5 * u - 4 * v + 2 * w
A4: O - 6 * u + 4 * v + 2 * w
A5: O - 6 * u - 4 * v + 2 * w
A6: O + 5 * u - 4 * v - 2 * w
A7: O - 6 * u + 4 * v - 2 * w
A8: O - 6 * u - 4 * v - 2 * w
h, i = SDLine(A3, A1, A6, A5)
j, k = SDLine(A1, A4, A7, A5)
l, m = SDLine(A5, A3, A8, A4)
n_1, p = SDLine(A4, A5, A7, A1)
q, r = SDLine(A4, A7, A2, A8)
s_2, t_2 = SDLine(A1, A2, A6, A7)
a_1, b_1 = SDLine(A5, A8, A7, A6)
c_1, d_1 = SDLine(A3, A6, A8, A2)
e_1, f_1 = SDLine(A8, A7, A5, A6)
g_1, h_1 = SDLine(A7, A2, A4, A8)
i_1, j_1 = SDLine(A6, A8, A3, A2)
k_1, l_1 = SDLine(A2, A6, A1, A7)
n = 0 (slider from 0 to 6, step 1)
α1 = Angle(A7, A2, A1)
α2 = Angle(A8, A7, A4)
α3 = Angle(A6, A8, A5)
α4 = Angle(A2, A6, A3)
α5 = Angle(A3, A5, A4)
α6 = Angle(A8, A6, A2)
t = 0 (slider from 0 to 4, step 0.01)
A6' = Mirror(A6, A2)
A8' = Mirror(A8, A7)
r_1 = Segment(A6, A2)
poly, a8, a6, a2, a7 = Polygon(A8, A6, A2, A7)
s = 0 (slider from 0 to 1, step 0.1)
ny: 0.1 * Random[-40, 40] + s * 0
nx: 0.1 * Random[-60, 50] + s * 0
P_t: O + nx * u + ny * v - 2 * w
P_u: O + nx * u + ny * v + 2 * w
k_2 = Segment(P_u, P_t)
B2: A6 + t * Vector[A6, A2]
B1: A3 + t * Vector[A6, A2]
m_1 = Segment(B2, B1)
B3: A2 + (t - 1) * Vector[A2, A7]
B4: A1 + (t - 1) * Vector[A2, A7]
p_1 = Segment(B4, B3)
B5: A7 + (t - 2) * Vector[A7, A8]
B6: A4 + (t - 2) * Vector[A4, A5]
q_1 = Segment(B6, B5)
B7: A8 + (t - 3) * Vector[A8, A6]
B8: A5 + (t - 3) * Vector[A5, A3]
c_2 = Segment(B8, B7)
d_2 = Line(B1, B2)
e_2 = Line(B3, B4)
f_2 = Line(B5, B6)
g_2 = Line(B7, B8)
h_2 = Line(P_u, P_t)
θ = 0.7853981633974483 rad (slider from 0*° to 179.9*°, step 0.1*°)
P_v: O - 0.5 * (1 - sin(θ)) * u + (1 - sin(θ)) * v + 2 * cos(θ) * w
P_w: O - 0.5 * u - 2 * w
s_1 = Line(P_v, P_w)

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)