# PolygonsΒΆ

Learning targets

• Use polygons

The polygon primitive is the most versatile one. It is in principle possible to describe any geometry just by polygons absolutely positioned within the -plane. However, it lies within the responsibility of the user to properly set all the polygon points. The example of this section shows a moderately irregular polygon above two layers:

Since all structures are defined in absolute coordinates, changing the shape of one structure, e.g. the height of the first layer, requires to change all polygon points.

`.jcm` Input File

• layout.jcm [ASCII]

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36``` ```Layout2D { Name = "TutorialExample2D" UnitOfLength = 1e-06 MeshOptions { MaximumSideLength = 1.5 } Objects { Polygon { Name = "ComputationalDomain/Background" DomainId = 1 Priority = -1 Points = [-3 -3, 3 -3, 3 3, 0 3.5, -3 3] } Polygon { Name = "Layer1" DomainId = 2 Points = [-3 -3, 3 -3, 3 -2, -3 -2] } Polygon { Name = "Layer2" DomainId = 3 Points = [-3 -2, 3 -2, 3 -1.5, -3 -1.5] } Polygon { Name = "Particle" DomainId = 4 Points = [0.0 -1.0, 0.5 0.5, 2.0 1.0, 0.5 1.5, 0.0 3.0, -0.5 1.5, -2.0 1.0,-0.5 0.5] MeshOptions { MaximumSideLength = 0.6 } } } } ```