-2
Polygon[{{{442.997, 358.128}, {424., 329.}, {436.438, 
269.919}, {485.639, 320.816}}, {{572.752, 
292.812}, {705.658, 191.098}, {624., 334.}, {609.854, 
348.146}, {570.475, 297.83}}, {{464.802, 381.573}, {498.744, 
331.34}, {508.086, 332.982}, {505.5, 348.5}, {495.722, 
397.392}, {479.103, 393.349}}, {{445.321, 368.088}, {442.997, 
358.128}, {485.639, 320.816}, {498.744, 331.34}, {464.802, 
381.573}, {458.299, 382.565}}, {{570.475, 297.83}, {609.854, 
348.146}, {624., 375.429}, {625.503, 378.65}, {565.059, 
397.838}, {543.815, 331.653}}, {{776., 105.25}, {776., 134.549}, {705.658, 
191.098}, {572.752, 292.812}, {481.892, 231.621}, {493.478, 
206.559}, {568.92, 105.25}}}]

I want to change the representing way into the following

{Polygon[{{609.854, 348.146}, {624., 334.}, {624., 375.429}}], 
Polygon[{{181.75, 333.5}, {174.732, 335.659}, {169.333, 308.667}}], 
Polygon[{{505.5, 348.5}, {505.5, 402.7}, {495.722, 397.392}}], 
Polygon[{{442.997, 358.128}, {424., 329.}, {436.438, 
269.919}, {485.639, 320.816}}], 
Polygon[{{164.187, 285.679}, {151.82, 301.851}, {115.851, 
310.269}, {159.994, 247.949}}], 
Polygon[{{568.92, 105.25}, {493.478, 206.559}, {450.574, 
182.043}, {416.444, 105.25}}], 
Polygon[{{211.75, 105.25}, {192.852, 199.739}, {127.386, 
195.063}, {10.308, 105.25}}], 
Polygon[{{371.196, 478.75}, {401.311, 381.457}, {443.24, 
399.906}, {430.367, 478.75}}], 
Polygon[{{543.815, 331.653}, {565.059, 397.838}, {550.145, 
438.549}, {510.5, 405.7}, {510.5, 333.086}}], 
Polygon[{{173.74, 242.534}, {177.482, 278.082}, {164.187, 
285.679}, {159.994, 247.949}, {164.211, 239.253}}], 
Polygon[{{401.402, 242.039}, {417.449, 261.095}, {341.933, 
321.272}, {332.108, 319.133}, {338.605, 267.158}}], 
Polygon[{{416.444, 105.25}, {450.574, 182.043}, {339.913, 
162.514}, {317.763, 138.438}, {315.55, 105.25}}], 
Polygon[{{415.662, 339.5}, {403.897, 370.269}, {399.794, 
374.757}, {356.729, 357.139}, {351.171, 339.5}}], 
Polygon[{{76.8045, 284.438}, {106.84, 315.197}, {108.887, 
328.131}, {92.7084, 370.825}, {32.397, 334.638}}], 
Polygon[{{209.734, 327.281}, {181.75, 333.5}, {169.333, 
308.667}, {168.212, 304.743}, {178.794, 304.413}}], 
Polygon[{{505.5, 348.5}, {508.086, 332.982}, {510.5, 
333.086}, {510.5, 405.7}, {505.5, 402.7}}]}

Is there anyone can answer the question?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
JasonX
  • 35
  • 5
  • 1
    Can you explain the connection between both "representations"? – Dr. belisarius Mar 10 '16 at 16:59
  • Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the [faq]! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Dr. belisarius Mar 10 '16 at 16:59
  • @Dr.belisarius Hi if there is no connection, i just simply want to change the representing way? Like Polygon[{{{442.997, 358.128}, {424., 329.}, {436.438, 269.919}, {485.639, 320.816}}, {{572.752, 292.812}, {705.658, 191.098}, {624., 334.}, {609.854, 348.146}, {570.475, 297.83}}}] to Polygon[{{442.997, 358.128}, {424., 329.}, {436.438, 269.919}, {485.639, 320.816}}], Polygon[{{572.752, 292.812}, {705.658, 191.098}, {624., 334.}, {609.854, 348.146}, {570.475, 297.83}}] – JasonX Mar 10 '16 at 17:10
  • 1
    You can use Thread. –  Mar 10 '16 at 17:20
  • @Xavier Thanks for your prompt reply, is that possible to paste the code for me?? – JasonX Mar 10 '16 at 17:23

2 Answers2

4

Another way is with Thread:

Thread[Polygon[{{{442.997, 358.128}, {424., 329.}, {436.438, 
 269.919}, {485.639, 320.816}}, {{572.752, 292.812}, {705.658, 
 191.098}, {624., 334.}, {609.854, 348.146}, {570.475, 
 297.83}}, {{464.802, 381.573}, {498.744, 331.34}, {508.086, 
 332.982}, {505.5, 348.5}, {495.722, 397.392}, {479.103, 
 393.349}}, {{445.321, 368.088}, {442.997, 358.128}, {485.639, 
 320.816}, {498.744, 331.34}, {464.802, 381.573}, {458.299, 
 382.565}}, {{570.475, 297.83}, {609.854, 348.146}, {624., 
 375.429}, {625.503, 378.65}, {565.059, 397.838}, {543.815, 
 331.653}}, {{776., 105.25}, {776., 134.549}, {705.658, 
 191.098}, {572.752, 292.812}, {481.892, 231.621}, {493.478, 
 206.559}, {568.92, 105.25}}}]]
{
 Polygon[{{442.997, 358.128}, {424., 329.}, {436.438, 269.919}, {485.639, 320.816}}], 
 Polygon[{{572.752, 292.812}, {705.658, 191.098}, {624., 334.}, {609.854, 348.146}, {570.475, 297.83}}], 
 Polygon[{{464.802, 381.573}, {498.744, 331.34}, {508.086, 332.982}, {505.5, 348.5}, {495.722, 397.392}, {479.103, 393.349}}], 
 Polygon[{{445.321, 368.088}, {442.997, 358.128}, {485.639, 320.816}, {498.744, 331.34}, {464.802, 381.573}, {458.299, 382.565}}], 
 Polygon[{{570.475, 297.83}, {609.854, 348.146}, {624., 375.429}, {625.503, 378.65}, {565.059, 397.838}, {543.815, 331.653}}], 
 Polygon[{{776., 105.25}, {776., 134.549}, {705.658, 191.098}, {572.752, 292.812}, {481.892, 231.621}, {493.478, 206.559}, {568.92, 105.25}}]
}
Greg Hurst
  • 35,921
  • 1
  • 90
  • 136
2
poly = Polygon[{{{442.997, 358.128}, {424., 329.}, {436.438, 
      269.919}, {485.639, 320.816}}, {{572.752, 292.812}, {705.658, 
      191.098}, {624., 334.}, {609.854, 348.146}, {570.475, 
      297.83}}, {{464.802, 381.573}, {498.744, 331.34}, {508.086, 
      332.982}, {505.5, 348.5}, {495.722, 397.392}, {479.103, 
      393.349}}, {{445.321, 368.088}, {442.997, 358.128}, {485.639, 
      320.816}, {498.744, 331.34}, {464.802, 381.573}, {458.299, 
      382.565}}, {{570.475, 297.83}, {609.854, 348.146}, {624., 
      375.429}, {625.503, 378.65}, {565.059, 397.838}, {543.815, 
      331.653}}, {{776., 105.25}, {776., 134.549}, {705.658, 
      191.098}, {572.752, 292.812}, {481.892, 231.621}, {493.478, 
      206.559}, {568.92, 105.25}}}];

You have not explained how, in general, to subdivide the original Polygon to get the shown representaion. Using instead the original list structure.

polys = Polygon /@ poly[[1]];

colors = ColorData[10] /@ Range[Length[polys]];

Graphics[Transpose[{colors, polys}]]

enter image description here

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198