Eleven paterns of the cube
Author: Daniel Mentrard

z

x

y

Open

Close

B_1 = (4.146719454725609, 1.8042846541528486)
View3D = (-4.1152707489943205, -0.4899535992670592)
xa: x(View3D)
sinphi: sin(xa)
cosphi: cos(xa)
ya: y(View3D)
sintheta: sin(ya)
costheta: cos(ya)
Zoom = 1 (slider from 1 to 5, step 0.1)
Z: (x(B_1), y(B_1) + (Zoom * costheta))
w = Vector(B_1, Z)
Y: (x(B_1) + (Zoom * cosphi), y(B_1) + ((Zoom * sinphi) * sintheta))
v = Vector(B_1, Y)
xy: (((-Zoom) * cosphi) * sintheta)
X: (x(B_1) + (Zoom * sinphi), y(B_1) + xy)
u = Vector(B_1, X)
O = (-0.6056319351827141, 0.39769810592516697)
a = 1 (slider from -5 to 5, step 0.1)
b = 1 (slider from -5 to 5, step 0.1)
d = 2 (slider from -5 to 5, step 0.1)
α = 0 rad (slider from 0° to 1.5707963267948966, step 0.017453292519943295)
A: O + (a * u) + (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w) + (((2 * a) * cos((2 * α))) * u) + ((b * sin((2 * α))) * w)
A' = Translate(A, Vector[(2 * v)])
P: O + (a * u) + (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w)
P' = Translate(P, Vector[(2 * v)])
g = 1 (slider from -5 to 5, step 0.1)
k = 1 (slider from -5 to 5, step 0.1)
a_1 = OrthogonalLine(View3D, yAxis)
b_1 = OrthogonalLine(View3D, xAxis)
c_1: cos(ya)
K: O + (a * u) + (b * v)
L: O - (a * u) + (b * v)
M: O - (a * u) - (b * v)
N: O + (a * u) - (b * v)
poly1, l, k_1, n, m = Polygon(L, K, N, M)
Q: O + (a * u) - (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w)
R: O - (a * u) + (b * v) - ((d * cos(α)) * u) + ((d * sin(α)) * w)
S: O - (a * u) - (b * v) - ((d * cos(α)) * u) + ((d * sin(α)) * w)
poly2, k_2, p, q, n_1 = Polygon(K, P, Q, N)
poly3, l_1, m_1, s, r = Polygon(L, M, S, R)
T: O + (a * u) + (b * v) + ((d * cos(α)) * v) + ((d * sin(α)) * w)
U: O - (a * u) + (b * v) + ((d * cos(α)) * v) + ((d * sin(α)) * w)
V: O + (a * u) - (b * v) - ((d * cos(α)) * v) + ((d * sin(α)) * w)
W: O - (a * u) - (b * v) - ((d * cos(α)) * v) + ((d * sin(α)) * w)
poly4, n_2, v_1, w_1, m_2 = Polygon(N, V, W, M)
poly5, k_3, t, u_1, l_2 = Polygon(K, T, U, L)
B: O + (a * u) - (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w) + (((2 * a) * cos((2 * α))) * u) + ((b * sin((2 * α))) * w)
poly6, b_2, q_1, p_1, a_2 = Polygon(B, Q, P, A)
Pattern = 1 (slider from 1 to 11, step 1)
D = Midpoint(R, M)
S' = Translate(S, Vector[(-((2 * v)))])
C: S' + (((2 * a) * sin(α)) * u) + ((d * sin(α)) * v)
e = Segment(S, C)
M' = Translate(M, Vector[(-2 * v)])
E: M' + (((2 * a) * sin(α)) * u) + ((d * sin(α)) * v)
f = Segment(M, E)
h = Segment(E, C)
N' = Translate(N, Vector[(-2 * v)])
Q'_1 = Translate(Q, Vector[(-2 * v)])
F: Q'_1 - (((2 * a) * sin(α)) * u) + ((b / 500 * sin(α)) * w) + ((d * sin(α)) * v)
i = Segment(Q, F)
G: N' - (((2 * a) * sin(α)) * u) + ((b / 500 * sin(α)) * w) + ((d * sin(α)) * v)
j = Segment(N, G)
d_1 = Segment(G, F)
Q'_2 = Translate(Q, Vector[(-2 * v)])
B'_1 = Translate(B, Vector[(-2 * v)])
I: B'_1 + (((2 * a) * sin((-((2 * α))))) * u) - ((d * sin((-α))) * v) - (((2 * b) * sin(α)) * w)
e_1 = Segment(B, I)
H: Q'_2 + (((2 * a) * sin((-((2 * α))))) * u) - ((d * sin((-α))) * v) - (((2 * b) * sin(α)) * w)
f_1 = Segment(I, H)
g_1 = Segment(H, Q)
K' = Translate(K, Vector[(2 * v)])
P'_1 = Translate(P, Vector[(2 * v)])
J: P'_1 - (((2 * a) * sin(α)) * u) - ((d * sin(α)) * v)
A_1: K' - (((2 * a) * sin(α)) * u) - ((d * sin(α)) * v)
h_1 = Segment(P, J)
i_1 = Segment(J, A_1)
j_1 = Segment(A_1, K)
H_1: O + (a * u) - (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w) + (((2 * a) * cos((2 * α))) * u) + ((b * sin((2 * α))) * w) + (((2 * a) * cos((3 * α))) * u) + (((2 * b) * sin((3 * α))) * w)
s_1 = Segment(B, H_1)
C_1: O + (a * u) + (b * v) + ((d * cos(α)) * u) + ((d * sin(α)) * w) + (((2 * a) * cos((2 * α))) * u) + ((b * sin((2 * α))) * w) + (((2 * a) * cos((3 * α))) * u) + (((2 * b) * sin((3 * α))) * w)
c = Segment(H_1, C_1)
r_1 = Segment(C_1, A)
D_1 = Midpoint(N, P)
E_1: O + ((3 * a) * u) + (b * v) + ((d * cos(α)) * v) + ((d * sin(α)) * w)
F_1 = Midpoint(k_1)
G_1: A' + (((2 * a) * sin((-((2 * α))))) * u) + ((d * sin((-α))) * v) - (((2 * b) * sin(α)) * w)
t_1 = Segment(A, G_1)
I_1: P' + (((2 * a) * sin((-((2 * α))))) * u) + ((d * sin((-α))) * v) - (((2 * b) * sin(α)) * w)
c_2 = Segment(G_1, I_1)
d_2 = Segment(I_1, P)
K_1: P'_1 + ((2 * a) * u) - (((4 * a) * sin(α)) * u) - (((2 * d) * sin(α)) * v)
f_2 = Segment(J, K_1)
L_1: P + ((2 * a) * u) - (((2 * a) * sin(α)) * u) - ((d * sin(α)) * v)
e_2 = Segment(P, L_1)
g_2 = Segment(L_1, K_1)
h_2 = Segment(M, W)
N_1: O - (a * u) - (b * v) - ((d * cos(α)) * v) + ((d * sin(α)) * w)
O_1 = Mirror(L_1, F_1)
P_1 = Mirror(K_1, F_1)
M_1: O - (a * u) - (b * v) - ((d * cos(α)) * u) + ((d * sin(α)) * w) + ((d * sin(α)) * v) - ((d * sin(α)) * w)
i_2 = Segment(M, M_1)
J_1: O - (a * u) - ((3 * b) * v) - ((d * cos(α)) * u) + ((d * sin(α)) * w) + (((2 * d) * sin(α)) * v)
j_2 = Segment(N_1, J_1)
p_2 = Segment(J_1, M_1)
poly7, q_2, r_2, s_2, t_2 = Polygon(M, E, C, S)
poly8, q_3, n_3, g_3, f_3 = Polygon(Q, N, G, F)
poly9, b_3, q_4, h_3, i_3 = Polygon(B, Q, H, I)
poly10, j_3, a_3, k_4, p_3 = Polygon(J, A_1, K, P)
poly11, c_3, a_4, b_4, h_4 = Polygon(C_1, A, B, H_1)
poly12, g_4, i_4, p_4, a_5 = Polygon(G_1, I_1, P, A)
poly13, k_5, j_4, p_5, l_3 = Polygon(K_1, J, P, L_1)
poly14, m_3, m_4, j_5, n_4 = Polygon(M, M_1, J_1, N_1)