Polygons vs Slicing Images

Any ideas how to create X random shaped polygons that would fit together (e.g.: from an 400px x 400px size) ? They also could be pre-determined shapes that fit together… Random would be better though…

I’d be applying it to the technique below.  What I’ll be using it for is jigsaw type puzzles, not having to slice the bitmap itself will save time, plus the ability to have variable pieces / sizes will be awesome.

“… simply fill the polygon with the image itself with Graphics 2.0…”

http://ragdogstudios.com/2013/12/29/transform-any-polygon-into-a-mask-with-corona-sdk/

Thanks!

Generate points across the image which are not more/less than given threshold distances apart. Then process across the points making polygons out of the points by recoding which points have been used.

There are a lot of issues with this process and it can get very complicated, so my advice is to use something approximating a template and pseudo-generate the polygons. With a bit of effort it can look very convincing but it will be a lot easier than genuinely creating random, tessellating polygons.

I’m kinda dumb sometimes…

I do actually have a piece of code which allows you to take an image and slice it randomly so that you get lots of pieces cut out of it. Each cut can be applied to every piece at the same time so pieces get smaller and smaller as you go. All you would need to do is apply a number of random cuts.

My blog posts: http://springboardpillow.blogspot.co.uk/search/label/polygons

PM me.

Generate points across the image which are not more/less than given threshold distances apart. Then process across the points making polygons out of the points by recoding which points have been used.

There are a lot of issues with this process and it can get very complicated, so my advice is to use something approximating a template and pseudo-generate the polygons. With a bit of effort it can look very convincing but it will be a lot easier than genuinely creating random, tessellating polygons.

I’m kinda dumb sometimes…

I do actually have a piece of code which allows you to take an image and slice it randomly so that you get lots of pieces cut out of it. Each cut can be applied to every piece at the same time so pieces get smaller and smaller as you go. All you would need to do is apply a number of random cuts.

My blog posts: http://springboardpillow.blogspot.co.uk/search/label/polygons

PM me.