investigation on volume
Author: Daniel Mentrard
Date: 4 Novembre 2013

Prism

Pyramid

Base:  B

V = B x h

V= ?

V= \frac{B  .  h }{3}

Transfer water

Zoom = 1.2 (slider from 0.1 to 5, step 0.1)
View3D = (3.3721799451456462, 1.9598156819164347)
ya: y(View3D)
costheta: cos(ya)
B_1 = (-2.5845955229589834, -0.7136977171541474)
Z: (x(B_1), y(B_1) + (Zoom * costheta))
xa: x(View3D)
sinphi: sin(xa)
cosphi: cos(xa)
sintheta: sin(ya)
xy: (((-Zoom) * cosphi) * sintheta)
g = 1 (slider from -5 to 5, step 0.1)
X: (x(B_1) + (Zoom * sinphi), y(B_1) + xy)
O = (0.6703132421876697, -0.014593300604032173)
k = 1 (slider from -5 to 5, step 0.1)
a_1 = OrthogonalLine(View3D, yAxis)
b = OrthogonalLine(View3D, xAxis)
c: cos(ya)
Y: (x(B_1) + (Zoom * cosphi), y(B_1) + ((Zoom * sinphi) * sintheta))
v = Vector(B_1, Y)
R = 1.9 (slider from 0.1 to 10, step 0.1)
h = 3.3 (slider from 0.1 to 10, step 0.1)
u = Vector(B_1, Z)
w = Vector(B_1, X)
n = 5 (slider from 3 to 20, step 1)
liste1 = Sequence(O + ((R * cos(i)) * u) + ((R * sin(i)) * v), i, 0, 6.28319, (2 * 3.141592653589793 / n))
poly1 = Polygon(liste1)
A = (6.365761556220678, 0.26099290813950027)
liste2 = Sequence(A + ((R * cos(i)) * u) + ((R * sin(i)) * v), i, 0, 6.28319, (2 * π / n))
poly2 = Polygon(liste2)
B: O + (h * w)
C: A + (h * w)
z = Vector(O, B)
o = 0.03 (slider from 0.01 to 1, step 0.01)
liste3 = Sequence(Translate[poly1, Vector[(i * z)]], i, 0, 1, o)
liste4 = Sequence(Dilate[poly2, i, C], i, 0, 1, o)
liste1b = Sequence(B + ((R * cos(i)) * u) + ((R * sin(i)) * v), i, 0, 6.28319, (2 * π / n))
liste5 = Sequence(Segment[Element[liste1, i], Element[liste1b, i]], i, 1, Length[liste1])
liste6 = Sequence(Segment[Element[liste2, i], C], i, 1, Length[liste2])
poly3 = Polygon(liste1b)
D = (3.2424511904606415, 4.633627420203548)
liste7 = Sequence(D + ((R / 2 * cos(i)), (R / 2 * sin(i))), i, 0, 6.28319, (2 * π / n))
poly4 = Polygon(liste7)
a = 0.34 (slider from 0 to 1, step 0.01)
d = Segment(B, O)
e = Segment(C, A)
liste8 = Sequence(Dilate[poly2, i, C], i, a, 1, o)
liste9 = Sequence(Translate[poly1, Vector[(i * z)]], i, 0, a / 3, o)
poly1' = Translate(poly1, Vector[(a / 3 * z)])
poly1'_1 = Translate(poly1, Vector[(2 / 3 * z)])
poly1'_2 = Translate(poly1, Vector[(a / 3 * z)])
poly5 = Element(liste8, 1)
j = Segment(Element[liste1, 3], O)
i = Segment(Element[liste2, 3], A)
f = Segment(Element[liste7, Length[liste7] - 2], D)
poly6 = Polygon(liste1)
poly7 = Polygon(liste2)
poly8 = Polygon(liste7)
texte7: "Number of sides :" + n + ""