Polygones
Author: Daniel mentrard

Polygônes croisés

Polygones à côtés consécutifs

Stop

sides = 9 (slider from 5 to 20, step 1)
mm: floor((3.0 * sides - 2.0) / 6.0)
O = (14.059610423166449, 5.022253088725027)
a = Line(O, xAxis)
Zoom = 4.6 (slider from 1 to 5, step 0.1)
d = Circle(O, Zoom)
A = Point(d)
b = Segment(O, A)
B = (2.580037190557631, -5.710128986731738)
c = Circle(B, Zoom)
E = Point(c)
f = 0 (slider from 0 to 5, step 1)
e = If(sides ≟ 6.0, 2.0, 3.0)
L1 = Sequence(Rotate[A, 360.0° / sides * i, O], i, 0.0, sides + mm)
L3 = Sequence(Segment[Element[L1, i], Element[L1, i + 1.0]], i, 1.0, sides)
C = (-8.967462510883193, 0.9466649588047363)
g = Circle(C, b)
liste1 = Sequence(Rotate[E, 360.0° / sides * i, B], i, 0.0, 2.0 * sides + mm)
Epaisseur = 0.73 (slider from -1 to 1, step 0.01)
h = Circle(B, b + Epaisseur)
i = Ray(B, E)
H, F_1 = Intersect(h, i)
liste5 = Sequence(Rotate[H, 360.0° / sides * i, B], i, 0.0, sides + mm)
liste3 = Sequence(Segment[Element[liste1, i], Element[liste1, i + mm]], i, 0.0, sides)
liste6 = Sequence(Segment[Element[liste5, i], Element[liste5, i + mm]], i, 0.0, 2.0 * sides + mm)
I = (2.3083313152296117, 4.78451044781301)
k = Circle(I, Zoom)
j = Line(I, i)
J, K = Intersect(k, j)
liste7 = Sequence(Rotate[K, 360.0° / sides * i, I], i, 0.0, sides + mm)
liste8 = Sequence(Segment[Element[liste7, i], Element[liste7, i + 2.0]], i, 0.0, sides + mm)
L = (14.297353064078466, -6.049761330891762)
p = Circle(L, Zoom)
L2 = Sequence(Segment[Element[L1, i], Element[L1, i + f + e]], i, 0.0, sides)
l = Line(L, j)
P, Q = Intersect(p, l)
liste9 = Sequence((x(L) + (Zoom + Epaisseur / 2.2) * cos(2.0 * 3.141592653589793 / sides * k), y(L) + (Zoom + Epaisseur / 2.2) * sin(2.0 * 3.141592653589793 / sides * k)), k, 1.0, sides, 1.0)
q = Line(C, i)
F, G = Intersect(g, q)
liste2 = Sequence(Rotate[G, 360.0° / sides * i, C], i, 0.0, sides + 2.0)
LL4 = Sequence(Segment[Element[liste2, i], Element[liste2, i + 1.0]], i, 0.0, sides + mm)
liste11 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + mm], Element[liste5, i + mm], Element[liste5, i]], i, 0.0, sides)
liste12 = Sequence(Rotate[F_1, 360.0° / sides * i, B], i, 0.0, 2.0 * sides + mm)
liste13 = Sequence(Segment[Element[liste12, i], Element[liste12, i + mm]], i, 0.0, sides)
liste14 = Sequence(Polygon[Element[liste1, i], Element[liste1, i + mm], Element[liste12, i + mm], Element[liste12, i]], i, 0.0, sides)
s = Circle(C, Zoom + Epaisseur / 2.0)
t = Ray(C, G)
D = Intersect(s, t)
liste15 = Sequence(Rotate[D, 360.0° / sides * i, C], i, 0.0, sides + mm)
LL1 = Sequence(Segment[Element[liste15, i], Element[liste15, i + 1.0]], i, 0.0, sides + mm)
LL17 = Sequence(Polygon[Element[liste2, i], Element[liste2, i + 1.0], Element[liste15, i + 1.0], Element[liste15, i]], i, 0.0, sides)
c_1 = Circle(I, Zoom + 2.0 * Epaisseur / 4.0)
a_1 = Ray(I, K)
M = Intersect(c_1, a_1)
liste4 = Sequence(Rotate[M, 360.0° / sides * i, I], i, 0.0, sides + mm)
liste16 = Sequence(Segment[Element[liste4, i], Element[liste4, i + 2.0]], i, 0.0, sides + mm)
liste17 = Sequence(Polygon[Element[liste7, i], Element[liste7, i + 2.0], Element[liste4, i + 2.0], Element[liste4, i]], i, 0.0, sides + mm)
d_1 = Circle(O, Zoom + 2.0 * Epaisseur / 3.0)
b_1 = Ray(O, A)
N = Intersect(d_1, b_1)
liste18 = Sequence(Rotate[N, 360.0° / sides * i, O], i, 0.0, sides + mm)
liste19 = Sequence(Segment[Element[liste18, i], Element[liste18, i + f + e]], i, 0.0, sides)
liste20 = Sequence(Polygon[Element[liste18, i], Element[liste18, i + f + e], Element[L1, i + e + f], Element[L1, i]], i, 0.0, sides)
liste21 = Sequence((x(L) + (Zoom + 2.0 * Epaisseur / 3.0) * cos(2.0 * 3.141592653589793 / sides * k), y(L) + (Zoom + 2.0 * Epaisseur / 3.0) * sin(2.0 * 3.141592653589793 / sides * k)), k, 1.0, sides, 1.0)
liste22 = Sequence(Sequence[Segment[Element[liste21, i], Element[liste21, i + j]], j, 1.0, sides - i], i, 1.0, sides - 1.0)
liste10 = Sequence(Sequence[Segment[Element[liste9, i], Element[liste9, i + j]], j, 1.0, sides - i, 1.0], i, 1.0, sides - 1.0, 1.0)
liste23 = Sequence(Sequence[Polygon[Element[liste21, i], Element[liste21, i + j], Element[liste9, i + j], Element[liste9, i]], j, 1.0, sides - i], i, 1.0, sides - 1.0)
R = (-2.955970019250764, 7.399679497845196)
S = (-3.057859722498771, -4.487452547755651)
m = Line(R, S)
e_1 = Circle(L, Zoom + Epaisseur / 1.3)
Vitesse = 0 (slider from 0 to 5, step 0.1)