I would like to construct a list of polygons by using two different lists of points:
list1={{0, 0.}, {0, 1.18961}, {0, 2.37923}, {0, 3.56884}, {0, 4.75846}, {0, 5.94807}, {0, 7.13769}}
list2 = {{2.70289, 0.512313}, {2.47741, 1.70193}, {2.25193, 2.89154}, {2.02645, 4.08116}, {1.80096, 5.27077}, {1.57548,6.46039}, {1.35, 7.65}}
The sequence/function that I tried to use to build the vertices of the polygons (5 points) is:
fpoly[a_Integer, x_List, y_List] = {x[[a]], y[[a]], y[[a + 1]], x[[a + 1]], x[[a]]}
That option does not work. I think if a type of evaluation control is used the fpoly might be an option, but I do not know how to implement it.
To build all the polygons from fpoly my plan was to use something like:
Table[fpoly[i,list1,list2],{i,1,6}]
Any suggestions, please?
SetDelayed
, i.e.,fpoly[a_Integer, x_List, y_List] := {x[[a]], y[[a]], y[[a + 1]], x[[a + 1]], x[[a]]}
$\endgroup$