Patron de pyramide
Author: Daniel Mentrard

close

open

r = 2.1 (slider from 0.1 to 10, step 0.1)
Faces = 6 (slider from 3 to 60, step 1)
k_2 = 360 (slider from 0 to 360, step 1)
k = 25 (slider from 0 to 90, step 1)
B_1 = (-4.4636832780471165, 0.131323679274038)
View3D = (-2.6828178199222585, 0.6883195189126516)
ya: y(View3D)
costheta: cos(ya)
sintheta: sin(ya)
xa: x(View3D)
cosphi: cos(xa)
sinphi: sin(xa)
Zoom = 1 (slider from -5 to 5, step 0.1)
Y: (x(B_1) + Zoom * cosphi, y(B_1) + Zoom * sinphi * sintheta)
u = Vector(B_1, Y)
Z: (x(B_1), y(B_1) + Zoom * costheta)
v = Vector(B_1, Z)
xy: -(Zoom) * cosphi * sintheta
X: (x(B_1) + Zoom * sinphi, y(B_1) + xy)
w = Vector(B_1, X)
O = (1.1716468389535426, 1.613391037042844)
h = 4.4 (slider from 0 to 10, step 0.1)
aa: (r + h) * sin(k°)
S = Translate(O, Vector[h * w])
z = Vector(S, O)
S' = Translate(S, Vector[sin(k°) * z])
l = Segment(O, S)
liste1 = Sequence((x(O), y(O)) - r * (sin(0.0°) * sin(i°) * v + cos(0.0°) * sin(i°) * v - cos(i°) * u), i, 0.0, k_2, k_2 / Faces)
j = Segment(Element[liste1, 1.0], S)
e = 1.6 (slider from 1 to 5, step 0.1)
g = 1 (slider from -5 to 5, step 0.1)
k_1 = 1 (slider from -5 to 5, step 0.1)
a = OrthogonalLine(View3D, yAxis)
b = OrthogonalLine(View3D, xAxis)
c: cos(ya)
O'_1 = Translate(O, w)
apo: sqrt(h^(2.0) + Zoom^(2.0))
d = Segment(Element[liste1, 1.0], S)
liste4 = Sequence(Segment[Element[liste1, i], S], i, 1.0, Faces)
liste3 = Sequence(Segment[Element[liste1, i], Element[liste1, i + 1.0]], i, 1.0, Faces)
f = 0.9 (slider from -5 to 5, step 0.1)
R = Translate(O, Vector[f * v])
liste6 = Sequence((x(S'), y(S')) - aa * (sin(k°) * sin(i°) * v + cos(k°) * sin(i°) * v - cos(i°) * u), i, 0.0, k_2, k_2 / Faces)
m = Segment(Element[liste1, 1.0], Element[liste1, 2.0])
q = Segment(Element[liste1, 2.0], S)
c_1 = Segment(Element[liste1, 2.0], O)
liste7 = Sequence(Midpoint[Element[liste6, i], Element[liste6, i + 1.0]], i, 0.0, Faces)
liste8 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + 1.0], S], i, 0.0, Faces)
liste11 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + 1.0], O], i, 0.0, Faces)
poly1, d_1, e_1, f_1 = Polygon(O, Element[liste1, 1.0], Element[liste1, 2.0])
liste10 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + 1.0], Element[liste7, i + 1.0]], i, 0.0, Faces)
liste2 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + 1.0], Element[liste7, i + 1.0]], i, 0.0, Faces)