3d 圖ㄧ
Author: Jui-Tang chen
Date: 2015,3,26

Scal：3D軸的長度
View3d：3D軸的旋轉
平面轉3D請用i,j,k為單位向量

xy-plane

yz-plane

xz-plane

沒影線

光源

O = (0, 0)
View3d = (6.538080483415733, 0.6700051473969243)
b: y(View3d - O) / 2
a: x(View3d - O) / 2
i: (cos(a), sin(a) * sin(b))
j: -(-sin(a), cos(a) * sin(b))
k: (0, cos(b))
Scal = 11 (slider from 0 to 35, step 1)
U_x: O + Scal * i
u = Vector(O, U_x)
U_z: O + Scal * k
v = Vector(O, U_z)
U_y: O + Scal * j
w = Vector(O, U_y)
list3 = Sequence(O + s * k, s, 1, Scal - 1)
list2 = Sequence(O + s * j, s, 1, Scal - 1)
list1 = Sequence(O + s * i, s, 1, Scal - 1)
list4 = Sequence(Segment[O - Scal * i + s * j, O + Scal * i + s * j], s, -Scal, Scal)
list5 = Sequence(Segment[O - Scal * j + s * i, O + Scal * j + s * i], s, -Scal, Scal)
list6 = Sequence(Segment[O - Scal * j + s * k, O + Scal * j + s * k], s, -Scal, Scal)
list7 = Sequence(Segment[O - Scal * k + s * j, O + Scal * k + s * j], s, -Scal, Scal)
list8 = Sequence(Segment[O - Scal * k + s * i, O + Scal * k + s * i], s, -Scal, Scal)
list9 = Sequence(Segment[O - Scal * i + s * k, O + Scal * i + s * k], s, -Scal, Scal)
c = true
d = false
e = false
u' = Mirror(u, O)
w' = Mirror(w, O)
v' = Mirror(v, O)
list1' = Mirror(list1, O)
list2' = Mirror(list2, O)
list3' = Mirror(list3, O)
α = 0.9599310885968813 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
list10 = Sequence(Segment[O + s * i - Scal * j + s * tan(α) * k, O + s * i + Scal * j + s * tan(α) * k], s, -Scal, Scal)
list11 = Sequence(Segment[O - Scal * i + s * j - Scal * tan(α) * k, O + Scal * i + s * j + Scal * tan(α) * k], s, -Scal, Scal)
xx = 4.8 (slider from -15 to 15, step 0.1)
yy = -0.7 (slider from -15 to 15, step 0.1)
zz = 3.6 (slider from -15 to 15, step 0.1)
O': O + xx * i + yy * j + zz * k
S_A: O + 2 * i + 2 * tan(α) * k
S_B: O + i + tan(α) * k
S_C: O + i + 3 * j + tan(α) * k
poly1, s_b, s_a, s_c = Polygon(S_A, S_C, S_B)
t_1: zz / (zz - 2 * tan(α))
t_2: zz / (zz - tan(α))
t_3: zz / (zz - tan(α))
P_A: O + O' + t_1 * (S_A - O')
P_B: O + O' + t_2 * (S_B - O')
P_C: O + O' + t_3 * (S_C - O')
poly2 = If((2 * tan(α) < zz) ∨ (zz < tan(α)), Polygon[P_A, P_B, P_C])
NN = Segment(O + zz / tan(α) * i - Scal * j + zz * k, O + zz / tan(α) * i + Scal * j + zz * k)
f = Line(O', S_A)
g = Line(O', P_B)
h = Line(O', S_C)
l = true