Group Abstract Group Abstract

Message Boards Message Boards

1
|
14.2K Views
|
7 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Partition images into hexagons ?

Posted 12 years ago

I am trying to partition images into hexagons. Is that possible in Mathematica?

7 Replies

Thanks for you reply

POSTED BY: André Dauphiné
POSTED BY: André Dauphiné

If one can build such a figure from polygons in Mathematica, then it is easy to use the same procedure - just this simple line will make texture mapping (partitioning):

Cases[ ..... , Polygon[p_, ___] :> Polygon[p, VertexTextureCoordinates -> p], Infinity]

no matter what complex arrangement of polygons we deal with.

POSTED BY: Vitaliy Kaurov

The solutions proposed by Vitally are very interesting A question : We have only two level of hexagones. Do you have a simple solution for 3, 4 or 5 levels?

POSTED BY: André Dauphiné

I am not sure what "3, 4 or 5 levels" would look like - is there a link to a picture somewhere?

POSTED BY: Vitaliy Kaurov
POSTED BY: Vitaliy Kaurov

The basic Image format is rectangular. ImagePartition only partitions Images into rectangular portions. You could however presumably make use of ImagePartition with various sizes and offsets to create a set of square crops at hexagonal grid points. Then these could be masked to remove the areas outside of the hexagonal region in each--leaving those areas transparent. This then could be used as an in-effect hexagonal partition. Of course the devil is in the details...

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard