Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "One Sided Polyomino Generation"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:4+1 =



Original Message (ID '38859') By Bill Simpson:
Here is a start at your task. In the notebook you gave down near the very bottom delete this --- Manipulate[GraphicsGrid[Partition[Join[Graphics[Sq[#, 1] & /@ #, ImageSize -> {50, 50}] & /@ shapes[numberOfSquares - 1], Table[Graphics[{White}], {60 - Length[shapes[numberOfSquares - 1]]}]], 10], Frame -> All], {{numberOfSquares, 3, "number of squares"}, {3, 4, 5, 6}}, SaveDefinitions -> True] --- and instead substitute this --- numberOfSquares = 5; g = Graphics[Sq[#, 1] & /@ #, ImageSize -> {50, 50}] & /@ shapes[numberOfSquares - 1]; For[i = 1, i ≤ Length[g], i++, Export[ToString[i] <> ".jpg", g[[i]]] ] --- That gets rid of the on screen presentation of the result and just generates a set of image files. I am guessing that you don't actually want image files. If you trim it down to just --- numberOfSquares = 5; p= {Sq[#, 1] & /@ #} & /@ shapes[numberOfSquares - 1] --- then you get a list of polygons and you can look up the help page for Polygon to understand how the verticies. You might be able to learn enough to write code to translate Polygon into the form of data that you actually want.