Rotation autour de j

Rotation autour de i

Rotation autour de u

Rotation autour de v

Rotation autour de w

O = (0, 0)
i = Vector((0, 0), (1, 0))
j = Vector((0, 0), (0, 1))
θ = 0.5410520681182421 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
φ = 0.5061454830783556 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
O_u: (-sin(θ), -cos(θ) sin(φ))
O_v: (cos(θ), -sin(θ) sin(φ))
O_w: (0, cos(φ))
u, v, w = ThreeDReferential(O, θ, φ)
ε_θ: x^(2) + y^(2) / sin(φ)^(2) = 1
α = 1.1693705988362009 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
a_α: (cos(φ)^(2) + sin(θ)^(2) sin(φ)^(2)) / (cos(θ)^(2) cos(φ)^(2))
b_α: 1 / cos(φ)^(2)
c_α: 2 sin(θ) sin(φ) / (cos(θ) cos(φ)^(2))
ε_α: a_α x^(2) + b_α y^(2) + c_α x y = 1
V'_α: (cos(α) cos(θ), sin(α) cos(φ) - cos(α) sin(θ) sin(φ))
V_α: (0, sin(α) cos(φ))
a_V: 1 / cos(α)^(2)
b_V: 1 / (cos(α)^(2) sin(φ)^(2))
c_V: -2 sin(α) cos(φ) / (cos(α)^(2) sin(φ)^(2))
d_V: 1 - sin(α)^(2) cos(φ)^(2) / (cos(α)^(2) sin(φ)^(2))
ε_V: a_V x^(2) + b_V y^(2) + c_V y = d_V
β = 1.064650843716541 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
O'_θ: (cos(θ / 2), -sin(θ / 2) sin(φ))
v' = Vector(O, O'_θ)
O'_u = Translate(O, Vector[-u])
O'_v = Translate(O, Vector[-v])
O'_w = Translate(O, Vector[-w])
A_1 = Translate(O_u, Vector[-v - w])
A_2 = Translate(O_u, Vector[v - w])
A_3 = Translate(O_v, Vector[-u - w])
A_4 = Translate(O'_u, Vector[-v - w])
A_5 = Translate(O'_u, Vector[-v + w])
A_6 = Translate(O_u, Vector[-v + w])
A_7 = Translate(O_u, Vector[v + w])
A_8 = Translate(O_v, Vector[-u + w])
f_1, A12, A23, A34, A41 = Polygon(A_1, A_2, A_3, A_4)
f_6, A56, A67, A78, A85 = Polygon(A_5, A_6, A_7, A_8)
f_2, A21, A27, A76, A61 = Polygon(A_1, A_2, A_7, A_6)
f5, A45, A43, A38, A58 = Polygon(A_5, A_4, A_3, A_8)
f_3, A32_1, A32, A87, A72 = Polygon(A_2, A_3, A_8, A_7)
f_4, A54, A65, A16, A14 = Polygon(A_4, A_5, A_6, A_1)
B_1 = Translate(O_v, w)
B_2 = Translate(O_w, Vector[1 / 2 v])
B1O'_v = Segment(O'_v, B_1)
B2O_v = Segment(O_v, B_2)
B_3 = Intersect(B1O'_v, B2O_v)
ε'_α = Conic(O_w, B_3, O_v, O'_w, O'_v)
ε'_V = Dilate(Translate[ε_θ, Vector[O, V_α]], cos(α), V_α)
D_1 = Translate(O_u, v)
D_2 = Translate(O_u, Vector[1 / 2 v])
D1O'_v = Segment(O'_v, D_1)
D2O_v = Segment(O_v, D_2)
D_3 = Intersect(D1O'_v, D2O_v)
ε'_θ = Conic(O_v, D_3, O_u, O'_v, O'_u)
C_1 = Translate(O_w, u)
C_2 = Translate(O_w, Vector[1 / 2 u])
C1O'_u = Segment(O'_u, C_1)
C2O_u = Segment(O_u, C_2)
C_3 = Intersect(C2O_u, C1O'_u)
ε'_β = Conic(O_u, C_3, O_w, O'_u, O'_w)
W_β: (-sin(β) sin(θ), -sin(β) cos(θ) sin(φ))
W'_β: (-sin(β) sin(θ), -sin(β) cos(θ) sin(φ) + cos(β) cos(φ))
a_β: (cos(φ)^(2) + cos(θ)^(2) sin(φ)^(2)) / (sin(θ)^(2) cos(φ)^(2))
b_β: -2 cos(θ) sin(φ) / (sin(θ) cos(φ)^(2))
c_β: 1 / cos(φ)^(2)
d_β = 0
e_β = 0
f_β = 1
ε_β: a_β x^(2) + b_β x y + c_β y^(2) + d_β x + e_β y = f_β
ε'_W = Dilate(ε_α, Distance[W_β, W'_β] / Distance[O, O_w], O)
ε_W = Translate(ε'_W, Vector[Vector[O, W_β]])
γ = 0.7504915783575618 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
U_γ: (sin(γ) cos(θ), -sin(γ) sin(θ) sin(φ))
U'_γ: (sin(γ) cos(θ) - cos(γ) sin(θ), -sin(γ) sin(θ) sin(φ) - cos(γ) cos(θ) sin(φ))
ε'_U = Dilate(ε_β, Distance[U_γ, U'_γ] / Distance[O, O_u], O)
ε_U = Translate(ε'_U, Vector[Vector[O, U_γ]])

Tool: ThreeDReferential
Input: A, th, phi
Output: i, j, k

i = Vector(A, A - sin(th) Vector[(1, 0)] - sin(phi) cos(th) Vector[(0, 1)])
j = Vector(A, A + cos(th) Vector[(1, 0)] - sin(phi) sin(th) Vector[(0, 1)])
k = Vector(A, A + cos(phi) Vector[(0, 1)])