Author: 藍邦偉　老師

單位向量

座標軸

Start

x

y

z

$ O $

A(1,0,0)

B(0,1,0)

C(0,0,1)

D(1,1,1)

G(0.5,0.5,0.5)

O = (14.345849050347717, 2.381061607671788)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 2.8797932657906435 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 = 2 (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)
c = false
d = true
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])
A: O + u
B: O + v
C: O + w
D: O + u + v + w
G: O + 0.5 * u + 0.5 * v + 0.5 * w
a_1 = Segment(A, B)
a_2 = Segment(A, C)
a_3 = Segment(A, D)
a_4 = Segment(C, B)
a_5 = Segment(D, B)
a_6 = Segment(D, C)
B': A - 0.5 * u + 0.5 * v - sqrt(6) / 2 * w
θ = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
R_0: A - cos(θ) * u + cos(θ) * v - sqrt(2) * sin(θ) * w
a = Segment(A, R_0)
c_x = CurveCartesian(x(A - cos(t) * u + cos(t) * v - sqrt(2) * sin(t) * w), y(A - cos(t) * u + cos(t) * v - sqrt(2) * sin(t) * w), t, 0, 6.283185307179586)