Tronc de cone
Author: Daniel Mentrard

Number of sides

R

B_1 = (-3.1345740064009555, -2.7416738557492013)
View3D = (-0.3017319833707854, -1.9922447491274629)
xa: x(View3D)
sinphi: sin(xa)
cosphi: cos(xa)
ya: y(View3D)
sintheta: sin(ya)
Zoom = 1.7 (slider from 0.1 to 12, step 0.1)
xy: -(Zoom) * cosphi * sintheta
g = 1 (slider from -5 to 5, step 0.1)
Z: (x(B_1) + Zoom * sinphi, y(B_1) + xy)
w = Vector(B_1, Z)
O = (5.333974898424685, -1.2877813889030292)
k = 1 (slider from -5 to 5, step 0.1)
costheta: cos(ya)
Y: (x(B_1), y(B_1) + Zoom * costheta)
v = Vector(B_1, Y)
a = OrthogonalLine(View3D, yAxis)
b = OrthogonalLine(View3D, xAxis)
c: cos(ya)
X: (x(B_1) + Zoom * cosphi, y(B_1) + Zoom * sinphi * sintheta)
u = Vector(B_1, X)
R = 2.2 (slider from -5 to 50, step 0.1)
h = 3.6 (slider from -5 to 5, step 0.1)
d = CurveCartesian(x(O - R * (0.0 * sin(i°) * v + sin(i°) * v - cos(i°) * u)), y(O - R * (0.0 * sin(i°) * v + sin(i°) * v - cos(i°) * u)), i, 0.0, 360.0)
Sides = 7 (slider from 3 to 30, step 1)
liste2 = Sequence(O - R * (0.0 * sin(i°) * v + sin(i°) * v - cos(i°) * u), i, 0.0, 360.0, 360.0 / Sides)
S: O + h * w
e = Segment(S, O)
liste3 = Sequence(Segment[Element[liste2, i], S], i, 1.0, Length[liste2])
B = Translate(O, Vector[-(R) * u])
f = Segment(S, B)
O'_1 = Translate(O, Vector[-(R) * v])
j = Segment(S, O'_1)
O'_2 = Translate(O, Vector[R * u])
O' = Translate(O, Vector[R * v])
MM = Element(liste2, 2.0)
i = Segment(S, MM)
l = Segment(O'_2, S)
m = Segment(S, O')
V = (-0.3239120041808243, 0.4637833922087791)
W: V + (R, 0.0)
A_1: V + (0.0, h)
b_1 = Segment(A_1, W)
c_1 = Segment(A_1, V)
d_1 = Segment(V, W)
s = CurveCartesian(x(O - R * (0.0 * sin(i°) * v + sin(i°) * v - cos(i°) * u)), y(O - R * (0.0 * sin(i°) * v + sin(i°) * v - cos(i°) * u)), i, 0.0, 360.0)
g_1 = Segment(MM, O)
F = Midpoint(g_1)
liste1 = Sequence(Segment[Element[liste2, i], Element[liste2, i + 1.0]], i, 1.0, Length[liste2])
liste4 = Sequence(Polygon[Element[liste2, i], O, Element[liste2, i + 1.0]], i, 1.0, Length[liste2])