Skip to main content
2 of 6
Used AspectRatio -> Automatic to make it look like how it is supposed to look.
Teg Louis
  • 74
  • 1
  • 3
  • 23

How to creatively create a random belt polygon or belt polyhedron?

Are there more creative solutions or related illustrations for belt polygons and polyhedrons than what I wrote down below like cvgmt's solution for zonotopes?

A zonogon is a convex polygon that is made up of parallel sides. Generating a random zonogon in Mathematica can be found here. A natural generalization of zonogons is called belt polygons. A belt polygon is a convex polygon that is made up of parallel line segments, but they are not necessarily the same length. I generalized SHuisman's solution to get the Mathematica code below for a random belt polygon:

ClearAll[CreateRandomBeltPolygon]
CreateRandomBeltPolygon[sides_?EvenQ, lendist : {min_, max_}] := 
 Module[{m, angles, dirs, lengths},
  m = sides/2;
  angles = RandomReal[{0, 1}, m];
  angles /= Total[angles]/(Pi);
  angles = Join[angles, angles];
  dirs = Accumulate[angles];
  dirs += RandomReal[{0, 2 Pi}];
  lengths = RandomReal[lendist, 2*m];
  Polygon[Accumulate[MapThread[AngleVector[{#1, #2}] &, {lengths, dirs}]]]
  ]
 Graphics[{EdgeForm[Thick],White,CreateRandomBeltPolygon[6, {0.5, 1}] }, AspectRatio->Automatic]

For example might give:

Belt polygon with 6 sides.

It seems worth having different solutions because it seems typically there are many different ways to approach this same problem, but at the same time all of the approaches are probably valuable.

$\color{magenta}{\star}$ Boltyanski, V., Martini, H., & Soltan, P. S. (1997). [Combinatorial geometry of belt bodies. In Excursions into Combinatorial Geometry (pp. 319–363)]. Springer Berlin Heidelberg. https://doi.org/10.1007/978-3-642-59237-9_7

Teg Louis
  • 74
  • 1
  • 3
  • 23