圓柱的截痕
Author: 藍邦偉  老師

分別拉動r與h決定圓柱的半徑與高，拉動D,E兩點決定截面

顯示單位向量

r = 4 (slider from 1 to 10, step 1)
A: (x((Corner[3.0] + 39.0 * Corner[4.0]) / 40.0), y((Corner[1.0] + 9.0 * Corner[4.0]) / 10.0))
B: (x((4.0 * Corner[3.0] + 16.0 * Corner[4.0]) / 20.0), y((Corner[1.0] + 9.0 * Corner[4.0]) / 10.0))
a = Segment(A, B)
C_1: (3.0 * A + B) / 4.0
D_1: (3.0 * B + A) / 4.0
E = Point(a)
c = Circle(C_1, E)
c' = Translate(c, Vector[Vector[C_1, D_1]])
A' = Rotate(A, 270.0*°, C_1)
B' = Rotate(B, 270.0*°, C_1)
a' = Segment(A', B')
c'' = Rotate(c', 270.0*°, C_1)
D'_1 = Rotate(D_1, 270.0*°, C_1)
E' = Rotate(Translate[E, Vector[C_1, D_1]], 90.0*°, D_1)
E'' = Rotate(E', 270.0*°, C_1)
F = Point(c'')
G_1 = Point(c')
α = Angle(E'', D'_1, F)
b = Segment(D'_1, F)
d_1 = Segment(D_1, G_1)
β = Angle(G_1, D_1, E')
I: C_1 + (b * cos(α), b * sin(α) * sin(β))
J: C_1 + (b * cos(α + 90.0°), b * sin(α + 90.0°) * sin(β))
K: C_1 + (0.0, b * cos(β))
e = Segment(C_1, K)
f = Segment(C_1, I)
g = Segment(C_1, J)
O = (5.7805111569753915, 4.486883047468473)
I' = Translate(I, Vector[Vector[C_1, O]])
J' = Translate(J, Vector[Vector[C_1, O]])
L: r + 2.0
K' = Translate(K, Vector[Vector[C_1, O]])
h_1 = Segment(D'_1, E'')
i = Segment(D_1, E')
軌跡1 = Locus(I, F)
L_{axis}: L
w = Vector(O, K')
u = Vector(O, I')
v = Vector(O, J')
k = false
h = 6 (slider from 1 to 10, step 1)
m_1 = CurveCartesian(x(O + r * cos(t) * u + r * sin(t) * v + h * w), y(O + r * cos(t) * u + r * sin(t) * v + h * w), t, 0.0, 6.28)
o = CurveCartesian(x(O + r * cos(t) * u + r * sin(t) * v - h * w), y(O + r * cos(t) * u + r * sin(t) * v - h * w), t, 0.0, 6.28)
J_1: O + h * w
J_2: O - h * w
H, M = Intersect(c, a)
u_0 = Vector(C_1, H)
U_1: J_1 + r * u_0
p = Segment(J_1, J_2)
N = Mirror(U_1, J_1)
P_1 = Mirror(U_1, O)
N' = Mirror(N, O)
q = Segment(U_1, N')
s = Segment(N, P_1)
P = Point(o)
n = Segment(P, J_2)
t = Segment(P_1, N')
P_2: P + 2.0 * h * w
a_1 = Segment(P_2, J_1)
b_1 = Segment(J_1, U_1)
c_1 = Segment(P_2, P)
D = Point(q)
C = Point(p)
e_1 = Line(C, D)
f_1 = Rotate(e_1, 60.0*°, D)
m = Line(D, t)
O'' = Intersect(m, p)
i_1 = Line(O'', n)
R_1 = Intersect(i_1, c_1)
R = Intersect(f_1, i_1)
j_1 = Line(C, R)
G = Intersect(j_1, c_1)
軌跡2 = Locus(G, P)