Nombre de choux à la crème par étage :

Etage 1

Etage 1

O = (0, 0)
R = 36.2 (slider from 0 to 50, step 0.1)
c = Circle(O, R)
A: (R; 0°)
r = 2 (slider from 0 to 5, step 0.1)
c' = Circle(A, r)
B, C = Intersect(c', c)
e = CircleArc(O, A, C)
a = Sphere(A, r)
α = 1.2217304763960306 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
h: (R * tan(α))
H: (0, 0, h)
n = 0 (slider from 0 to 60, step 1)
b = Length(e)
β: (360 * e / ((R * π)))
liste1_1 = Sequence((i * β), i, 0, n)
liste1_2 = Sequence((R; (π / 180 * Element[liste1_1, i])), i, 1, n)
D = Point(liste1_2)
liste1_3 = Sequence(Sphere[Element[liste1_2, i], r], i, 1, n)
f = Line(A, H)
liste0_1 = Sequence(x(A) - (((2 * i) * r) * cos(α)), i, 0, x(A) / (((2 * r) * cos(α))))
liste0_2 = Sequence(z(A) + (((2 * i) * r) * sin(α)), i, 0, h / (((2 * r) * sin(α))))
i = Sum(Frequency[liste0_2])
A1 = Element(liste0_1, 1)
A2 = Element(liste0_1, 2)
A3: (2 * A2) - A1
A4: (2 * A3) - A2
A5: (2 * A4) - A3
A6: (2 * A5) - A4
A7: (2 * A6) - A5
A8: (2 * A7) - A6
A9: (2 * A8) - A7
A10: (2 * A9) - A8
A11: (2 * A10) - A9
A12: (2 * A11) - A10
A13: (2 * A12) - A11
A14: (2 * A13) - A12
A15: (2 * A14) - A13
A16: (2 * A15) - A14
A17: (2 * A16) - A15
A18: (2 * A17) - A16
A19: (2 * A18) - A17
A20: (2 * A19) - A18
B1 = 0
B2 = 0
B3 = 0
B4 = 0
B5 = 0
B6 = 0
B7 = 0
B8 = 0
B9 = 0
B10 = 0
B11 = 0
B12 = 0
B13 = 0
B14 = 0
B15 = 0
B16 = 0
B17 = 0
B18 = 0
B19 = 0
B20 = 0
C1 = Element(liste0_2, 1)
C2 = Element(liste0_2, 2)
C3: (2 * C2) - C1
C4: (2 * C3) - C2
C5: (2 * C4) - C3
C6: (2 * C5) - C4
C7: (2 * C6) - C5
C8: (2 * C7) - C6
C9: (2 * C8) - C7
C10: (2 * C9) - C8
C11: (2 * C10) - C9
C12: (2 * C11) - C10
C13: (2 * C12) - C11
C14: (2 * C13) - C12
C15: (2 * C14) - C13
C16: (2 * C15) - C14
C17: (2 * C16) - C15
C18: (2 * C17) - C16
C19: (2 * C18) - C17
C20: (2 * C19) - C18
A_1: (A1, B1, C1)
A_2: (A2, B2, C2)
A_3: (A3, B3, C3)
A_4: (A4, B4, C4)
A_5: (A5, B5, C5)
A_6: (A6, B6, C6)
A_7: (A7, B7, C7)
O_2: (0, 0, z(A_2))
O_3: (0, 0, z(A_3))
O_4: (0, 0, z(A_4))
O_5: (0, 0, z(A_5))
O_6: (0, 0, z(A_6))
c_2 = Circle(O, x(A_2))
A'_2 = Intersect(c_2, xAxis, r)
c'_2 = Circle(A'_2, r)
B_2, C_2 = Intersect(c'_2, c_2)
e_2 = CircleArc(O, B_2, C_2)
b_2 = Length(e_2)
β_2: (180 * 4.13 / ((R * π)))
n_2 = 0 (slider from 0 to 55, step 1)
liste2_1 = Sequence((i * β_2), i, 0, n_2)
liste2_2 = Sequence((x(A_2); (π / 180 * Element[liste2_1, i])), i, 1, n_2)
liste2_3 = Sequence(((x(A_2) * cos((π / 180 * Element[liste2_1, i]))), (x(A_2) * sin((π / 180 * Element[liste2_1, i]))), z(A_2)), i, 1, n_2)
liste2_4 = Sequence(Sphere[Element[liste2_3, i], r], i, 1, n_2)
c_3 = Circle(O, x(A_3))
A'_3 = Intersect(c_3, xAxis, r)
c'_3 = Circle(A'_3, r)
B_3, C_3 = Intersect(c'_3, c_3)
e_3 = CircleArc(O, B_3, C_3)
β_3: (180 * (e_3 + 0.29) / ((R * π)))
n_3 = 0 (slider from 0 to 53, step 1)
liste3_1 = Sequence((i * β_3), i, 0, n_3)
liste3_2 = Sequence((x(A_3); (π / 180 * Element[liste3_1, i])), i, 1, n_3)
liste3_3 = Sequence(((x(A_3) * cos((π / 180 * Element[liste3_1, i]))), (x(A_3) * sin((π / 180 * Element[liste3_1, i]))), z(A_3)), i, 1, n_3)
liste3_4 = Sequence(Sphere[Element[liste3_3, i], r], i, 1, n_3)
c_4 = Circle(O, x(A_4))
A'_4 = Intersect(c_4, xAxis, r)
c'_4 = Circle(A'_4, r)
B_1, C_4 = Intersect(c_4, c'_4)
e_4 = CircleArc(O, C_4, B_1)
β_4: (180 * (e_4 + 0.46) / ((R * π)))
n_4 = 0 (slider from 0 to 51, step 1)
liste4_1 = Sequence((i * β_4), i, 0, n_4)
liste4_3 = Sequence(((x(A_4) * cos((π / 180 * Element[liste4_1, i]))), (x(A_4) * sin((π / 180 * Element[liste4_1, i]))), z(A_4)), i, 1, n_4)
liste4_4 = Sequence(Sphere[Element[liste4_3, i], r], i, 1, n_4)
c_5 = Circle(O, x(A_5))
A'_5 = Intersect(c_5, xAxis, r)
c'_5 = Circle(A'_5, r)
B_4, B_5 = Intersect(c'_5, c_5)
e_5 = CircleArc(O, B_4, B_5)
β_5: (180 * (e_5 + 0.65) / ((R * π)))
n_5 = 0 (slider from 0 to 49, step 1)
liste5_1 = Sequence((i * β_5), i, 0, n_5)
liste5_3 = Sequence(((x(A_5) * cos((π / 180 * Element[liste5_1, i]))), (x(A_5) * sin((π / 180 * Element[liste5_1, i]))), z(A_5)), i, 1, n_5)
liste5_4 = Sequence(Sphere[Element[liste5_3, i], r], i, 1, n_5)
c_6 = Circle(O, x(A_6))
A'_6 = Intersect(c_6, xAxis, r)
c'_6 = Circle(A'_6, r)
B_7, B_6 = Intersect(c'_6, c_6)
e_6 = CircleArc(O, B_7, B_6)
β_6: (180 * (e_6 + 0.84) / ((R * π)))
n_6 = 0 (slider from 0 to 47, step 1)
liste6_1 = Sequence((i * β_6), i, 0, n_6)
liste6_3 = Sequence(((x(A_6) * cos((π / 180 * Element[liste6_1, i]))), (x(A_6) * sin((π / 180 * Element[liste6_1, i]))), z(A_6)), i, 1, n_6)
liste6_4 = Sequence(Sphere[Element[liste6_3, i], r], i, 1, n_6)
c_7 = Circle(O, x(A_7))
A'_7 = Intersect(c_7, xAxis, r)
c'_7 = Circle(A'_7, r)
E, F = Intersect(c'_7, c_7)
n_7 = 0 (slider from 0 to 45, step 1)
β_7: (180 * (e_6 + 1.05) / ((R * π)))
liste7_1 = Sequence((i * β_7), i, 0, n_7)
liste7_3 = Sequence(((x(A_7) * cos((π / 180 * Element[liste7_1, i]))), (x(A_7) * sin((π / 180 * Element[liste7_1, i]))), z(A_7)), i, 1, n_7)
liste7_4 = Sequence(Sphere[Element[liste7_3, i], r], i, 1, n_7)
texte1: "Rayon de la base du cône = " + R + " cm"
texte2: "Angle du cône = " + α + ""
texte3: "Rayon du chou = " + r + " cm"
"Etage 1 : " + n + "": "Etage 7 : " + n + ""
d = Sphere(H, r)
texte4: "Etage 29 : " + n + ""
texte5: "Etage 28 : " + n_2 + ""
texte6: "Etage 27 : " + n_3 + ""
texte7: "Etage 26 : " + n_4 + ""
texte8: "Etage 25 : " + n_5 + ""
texte9: "Etage 24 : " + n_6 + ""
texte10: "Etage 23 : " + n_7 + ""
g = false