圓與球面
Author: 藍邦偉  老師

半圓繞ｚ軸旋轉一周，得一球面。

x

y

z

單位向量

顯示座標軸

Start

圓與球

x

y

z

α = 0 rad (slider from 0*° to 360*°, step 0.1*°)
β = 1.5707963267948966 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
O = (8.759733300736109, 4.341371479071757)
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 = 4 (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 = true
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)
r = 3 (slider from 1 to 4.5, step 0.1)
n = 1 (slider from 1 to 24, step 1)
List1 = Sequence(CurveCartesian[x(O + r * cos(t) * cos(i * π / 12) * u + r * cos(t) * sin(i * π / 12) * v + r * sin(t) * w), y(O + r * cos(t) * cos(i * π / 12) * u + r * cos(t) * sin(i * π / 12) * v + r * sin(t) * w), t, -1.5708, 1.5708], i, 1, n)
list2 = Sequence(CurveCartesian[x(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), y(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), s, 0, 6.28], t, -1.57, 1.57, 0.15)

Tool: Poly_B3
Input: A, B, C
Output: poly1'

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

Tool: Poly_B5
Input: A, B, C, D, E
Output: poly1'

poly1, a, b, c, d, e = Polygon(A, B, C, D, E)
F = Midpoint(b)
G = Midpoint(d)
α = Angle(G, F, A)
f: sqrt(sgn(sin(α)))
A' = Dilate(A, f, A)
B' = Dilate(B, f, A)
C' = Dilate(C, f, A)
D' = Dilate(D, f, A)
E' = Dilate(E, f, A)
poly1', a', b', c', d', e' = Polygon(A', B', C', D', E')