Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

GraphicsArray, scaling and AspectRatio

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36327] GraphicsArray, scaling and AspectRatio
  • From: "DIAMOND Mark R." <dot at dot.dot>
  • Date: Mon, 2 Sep 2002 04:08:34 -0400 (EDT)
  • Organization: The University of Western Australia
  • Sender: owner-wri-mathgroup at wolfram.com

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: How to ...? Piecewise Function Definition
  • Next by Date: Re: Mathematica 4.2: Problem with online help.
  • Previous by thread: RE: How to ...? Piecewise Function Definition
  • Next by thread: RE: GraphicsArray, scaling and AspectRatio