/home/stephan/Bureau/03. Visualiser des solides (avec des variables)/cube_fil

n

n

Volume

Aléatoire

(Ctrl+R)

Variable

n

Pour chaque valeur
de n, détermine le
volume du solide et
inscris tes réponses 
dans le tableur.

Pour la dernière ligne,
on attend une 
expression algébrique
avec la variable n.

a = 4 (slider from 1 to 20, step 1)
Aire(n) = 0
Volume(n) = (12 * n) + 8
A2: 1
A3: 2
A4: 3
A5: 4
A6: 5
A7: 6
A8: 7
A9: 8
A10: 9
A11: 10
A12: 100
A14 = Random(150, 250)
Réponse1: Volume
Réponse2: Aire
Formule1(n) = (6 * n)
Formule2(n) = (4 * n) + 2
tmp = If(Formule1 ≟ Réponse1, 1, 0)
R: (((-(a + 2))) / 2, ((-(a + 2))) / 2, ((-(a + 2))) / 2)
m1, l1, l2 = pavé(R, a + 2, 1, 1)
m2, l3, l4 = pavé(R + (0, a + 1, 0), a + 2, 1, 1)
m3, l5, l6 = pavé(R + (0, a + 1, a + 1), a + 2, 1, 1)
m4, l7, l8 = pavé(R + (0, 0, a + 1), a + 2, 1, 1)
m5, l9, l10 = pavé(R + (0, 0, 1), 1, 1, a)
m6, l11, l12 = pavé(R + (a + 1, 0, 1), 1, 1, a)
m7, l13, l14 = pavé(R + (a + 1, a + 1, 1), 1, 1, a)
m8, l15, l16 = pavé(R + (0, a + 1, 1), 1, 1, a)
m9, l17, l18 = pavé(R + (0, 1, 0), 1, a, 1)
m10, l19, l20 = pavé(R + (a + 1, 1, 0), 1, a, 1)
m11, l21, l22 = pavé(R + (0, 1, a + 1), 1, a, 1)
m12, l23, l24 = pavé(R + (a + 1, 1, a + 1), 1, a, 1)

Tool: pavé
Input: R, c_x, c_y, c_z
Output: L_{segment}, L_{point}, L_{polygones}

S_1 = Sequence({Segment[R + (i, 0, 0), R + (i, c_y, 0)], Segment[R + (i, c_y, 0), R + (i, c_y, c_z)], Segment[R + (i, c_y, c_z), R + (i, 0, c_z)], Segment[R + (i, 0, c_z), R + (i, 0, 0)]}, i, 0, c_x, 1)
S_2 = Sequence({Segment[R + (0, i, 0), R + (c_x, i, 0)], Segment[R + (c_x, i, 0), R + (c_x, i, c_z)], Segment[R + (c_x, i, c_z), R + (0, i, c_z)], Segment[R + (0, i, c_z), R + (0, i, 0)]}, i, 0, c_y, 1)
S_3 = Sequence({Segment[R + (0, 0, i), R + (c_x, 0, i)], Segment[R + (c_x, 0, i), R + (c_x, c_y, i)], Segment[R + (c_x, c_y, i), R + (0, c_y, i)], Segment[R + (0, c_y, i), R + (0, 0, i)]}, i, 0, c_z, 1)
L_{segment} = Join({S_1, S_2, S_3})
L_{point}: {R, R + (c_x, 0, 0), R + (c_x, c_y, 0), R + (0, c_y, 0), R + (0, 0, c_z), R + (c_x, 0, c_z), R + (c_x, c_y, c_z), R + (0, c_y, c_z)}
L_{polygones}: {Polygon[R + (0, 0, 0), R + (c_x, 0, 0), R + (c_x, 0, c_z), R + (0, 0, c_z), R + (0, 0, 0)], Polygon[R + (0, c_y, 0), R + (c_x, c_y, 0), R + (c_x, c_y, c_z), R + (0, c_y, c_z), R + (0, c_y, 0)], Polygon[R + (0, 0, 0), R + (c_x, 0, 0), R + (c_x, c_y, 0), R + (0, c_y, 0), R + (0, 0, 0)], Polygon[R + (0, 0, c_z), R + (c_x, 0, c_z), R + (c_x, c_y, c_z), R + (0, c_y, c_z), R + (0, 0, c_z)], Polygon[R + (0, 0, 0), R + (0, c_y, 0), R + (0, c_y, c_z), R + (0, 0, c_z), R + (0, 0, 0)], Polygon[R + (c_x, 0, 0), R + (c_x, c_y, 0), R + (c_x, c_y, c_z), R + (c_x, 0, c_z), R + (c_x, 0, 0)]}