CUBE
Author: Daniel Mentrard

Cube

Zoom = 1.7 (slider from 0.1 to 5, step 0.1)
MOVE = (5.689092392463987, 0.49282341757148074)
xa: x(MOVE)
sinphi: sin(xa)
cosphi: cos(xa)
ya: y(MOVE)
sintheta: sin(ya)
xy: -(Zoom) * cosphi * sintheta
d = Circle(MOVE, 0.2)
C = Point(d)
e = Ray(MOVE, C)
a = OrthogonalLine(MOVE, yAxis)
b = OrthogonalLine(MOVE, xAxis)
c: cos(ya)
costheta: cos(ya)
B = Intersect(xAxis, yAxis)
D: (0.0, Zoom * costheta)
Y: (Zoom * cosphi, Zoom * sinphi * sintheta)
X: (Zoom * sinphi, xy)
u = Vector(B, X)
v = Vector(B, Y)
w = Vector(B, D)
O = (9.711590906107356, 0.329624906446521)
P = Translate(O, u)
Q = Translate(P, v)
R = Translate(Q, w)
S = Mirror(R, O)
T = Mirror(R, Q)
U = Mirror(T, P)
V = Mirror(R, P)
W = Mirror(U, O)
Z = Mirror(T, O)
A1 = Mirror(V, O)
k = Segment(Z, U)
l = Segment(U, V)
m = Segment(V, T)
n = Segment(T, W)
p = Segment(W, A1)
q = Segment(A1, Z)
r = Segment(A1, R)
s = Segment(R, T)
t = Segment(R, U)
a1 = Segment(Z, S)
b1 = Segment(S, W)
c1 = Segment(S, V)
B1 = facecachée3points(W, S, Z)
C1 = facecachée3points(Z, A1, S)
poly2, c1_1, a1_1, b1_1, s_1 = Polygon(C1, A1, B1, S)
poly4, d1, f1, j1, k1 = fachequadrlatèrecachée(Z, U, V, S)
poly5, l1, m1, n1, p1 = fachequadrlatèrecachée(A1, R, U, Z)
poly6, q1, r1, s1, t1 = fachequadrlatèrecachée(W, S, V, T)
poly7, a2, b2, c2, d2 = fachequadrlatèrecachée(U, R, T, V)
poly8, e2, f2, g2, h2 = fachequadrlatèrecachée(R, A1, W, T)

Tool: face cachée 3 points (command facecachée3points)
Input: F, G, H
Output: J

g = Ray(F, G)
F' = Rotate(F, 90.0*°, F)
G' = Rotate(G, 90.0*°, F)
h = Ray(F', G')
i = OrthogonalLine(H, h)
I = Intersect(h, i)
j = OrthogonalLine(I, g)
J = Intersect(g, j)

Tool: fache quadrlatère cachée (command fachequadrlatèrecachée)
Input: D1, E1, F1, G1
Output: poly3, e1, i1, g1, h1

H1 = facecachée3points(D1, G1, F1)
I1 = facecachée3points(F1, E1, D1)
poly3, h1, g1, i1, e1 = Polygon(H1, G1, I1, E1)