RE: GraphicsArray, scaling and AspectRatio

• To: mathgroup at smc.vnet.net
• Subject: [mg36361] RE: [mg36327] GraphicsArray, scaling and AspectRatio
• From: "David Park" <djmp at earthlink.net>
• Date: Tue, 3 Sep 2002 01:41:03 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Mark,

Just add a PlotRange option and that each pentomino will be plotted to the
same scale.

Show[
GraphicsArray[
Partition[
Table[
Graphics[
Map[Rectangle[#, (# + {1, 1})] &, pentominoes[[i]]],
AspectRatio -> Automatic,
PlotRange -> {{0, 5}, {0, 5}}
], {i, 12}],
6]
]
]

David Park

From: DIAMOND Mark R. [mailto:dot at dot.dot]
To: mathgroup at smc.vnet.net

I managed to post this on alt.math.recreational by mistake, and confuse
everyone!

I am having a bit of trouble with showing the shapes of pentominoes. The
list of pentominoes is 12 x 5 x 2, for 12 pentominoes x 5 squares x {X,Y}
coordinate of the square on a zero-origin basis.

Just for completeness ...
pentominoes =
{
{{0, 0}, {1, 0}, {1, 1}, {1, 2}, {2, 1}}, (*F*)
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, (*I*)
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {0, 1}}, (*L*)
{{0, 0}, {1, 0}, {2, 0}, {2, 1}, {3, 1}}, (*N*)
{{0, 0}, {1, 0}, {2, 0}, {0, 1}, {1, 1}}, (*P*)
{{0, 0}, {1, 0}, {2, 0}, {1, 1}, {1, 2}}, (*T*)
{{0, 0}, {1, 0}, {2, 0}, {0, 1}, {2, 1}}, (*U*)
{{0, 0}, {1, 0}, {2, 0}, {0, 1}, {0, 2}}, (*V*)
{{0, 0}, {1, 0}, {1, 1}, {2, 1}, {2, 2}}, (*W*)
{{1, 0}, {0, 1}, {1, 1}, {2, 1}, {1, 2}}, (*X*)
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {1, 1}}, (*Y*)
{{0, 0}, {1, 0}, {1, 1}, {1, 2}, {2, 2}}  (*Z*)
}

When I display them with the code below, the aspect ratio is correct *within
each pentomino* but they are not scaled equivalently. I would appreciate a
pointer to what I have done wrong. The only solution I have been able to
develop so far effectively places each of the 12 pentominoes at a different
location in the plane, and then draws the whole region in one go.

Show[
GraphicsArray[
Partition[
Table[
Graphics[
Map[Rectangle[#, (# + {1, 1})] &, pentominoes[[i]]],
AspectRatio -> Automatic
], {i, 12}],
6]
]
]

Cheers,
--
Mark R. Diamond

```

• Prev by Date: Re: Generating Two Unit Orthogonal Vectors to a 3D Vector
• Next by Date: Re: Re: How to ...?
• Previous by thread: GraphicsArray, scaling and AspectRatio
• Next by thread: Program fails to run if uid=0 and shell is /bin/tcsh