Author: Daniel Mentrard

Pattern

Boite

Open

Close

côtes en cm

n = 40 (slider from 1 to 50, step 0.1)
B_1 = (2.4559175782395037, -2.4269632520105375)
View3d = (2.2852499189074016, -0.7604437550029516)
xa: x(View3d)
sinphi: sin(xa)
cosphi: cos(xa)
ya: y(View3d)
sintheta: sin(ya)
Zoom = 1 (slider from 0.1 to 5, step 0.1)
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)
Width = 80 (slider from 0 to 250, step 0.1)
O = (6, -1)
O'_1 = Translate(O, Vector[Width / (2.0 * n) * u])
Length = 90 (slider from 0 to 300, step 0.1)
A = Translate(O'_1, Vector[Length / (2.0 * n) * v])
β = 0.4363323129985824 rad (slider from 0 to 3.12413936106985, step 0.017453292519943295)
costheta: cos(ya)
D = Mirror(A, O'_1)
DD = Translate(D, Vector[-(Width) / n * u])
Z: (x(B_1), y(B_1) + Zoom * costheta)
w = Vector(B_1, Z)
α = 1.2915436464758039 rad (slider from 0 to 1.5707963267948966, step 0.017453292519943295)
Height = 60 (slider from 0 to 300, step 0.1)
F: DD - Height / n * cos(α) * v + Height / n * sin(α) * w
k = 1 (slider from -5 to 5, step 0.1)
a = OrthogonalLine(View3d, yAxis)
b = OrthogonalLine(View3d, xAxis)
c: cos(ya)
R = -0.2 (slider from -5 to 5, step 0.1)
AA = Translate(A, Vector[-(Width) / n * u])
poly1, a'', a_1, a', a'_1 = Polygon(AA, A, D, DD)
B: A + Height / n * cos(α) * u + Height / n * sin(α) * w
E: D - Height / n * cos(α) * v + Height / n * sin(α) * w
C: D + Height / n * cos(α) * u + Height / n * sin(α) * w
poly2, a_2, b_1, c_1, d = Polygon(A, B, C, D)
poly3, dd, d_1, e, f = Polygon(DD, D, E, F)
G: DD - Height / n * cos(α) * u + Height / n * sin(α) * w
H: AA - Height / n * cos(α) * u + Height / n * sin(α) * w
poly4, h_1, aa, dd_1, g_1 = Polygon(H, AA, DD, G)
I: A + Height / n * cos(α) * v + Height / n * sin(α) * w
J: AA + Height / n * cos(α) * v + Height / n * sin(α) * w
poly5, i, a_3, aa_1, j = Polygon(I, A, AA, J)
K: J + Length / (2.0 * n) * cos(β) * v + Length / (2.0 * n) * sin(β) * w
L: I + Length / (2.0 * n) * cos(β) * v + Length / (2.0 * n) * sin(β) * w
N: E - Length / (2.0 * n) * cos(β) * v + Length / (2.0 * n) * sin(β) * w
poly6, j_1, k_1, l, i_1 = Polygon(J, K, L, I)
M: F - Length / (2.0 * n) * cos(β) * v + Length / (2.0 * n) * sin(β) * w
poly7, m, f_1, e_1, n_1 = Polygon(M, F, E, N)
P: B + Width / (2.0 * n) * cos(β) * u + Width / (2.0 * n) * sin(β) * w
Q: C + Width / (2.0 * n) * cos(β) * u + Width / (2.0 * n) * sin(β) * w
poly8, b_2, p, q, c_2 = Polygon(B, P, Q, C)
S: H - Width / (2.0 * n) * cos(β) * u + Width / (2.0 * n) * sin(β) * w
T: G - Width / (2.0 * n) * cos(β) * u + Width / (2.0 * n) * sin(β) * w
poly9, h_2, s, t, g_2 = Polygon(H, S, T, G)
texte6: "Volume = " + (Length * Width * Height) + " cm³"