| Author |
Comment/Response |
Lucija
|
10/31/06 10:06am
Hi!
I'm trying to generate some Set cards, every card consists of 1 to 3 same symbols. I wanted to make the card making process a bit more automatic then just typing commands, but instead choose a number of symbols needed and then outputing the graphics using a For loop.
For instance, I used this code to draw 3 rectangles
elnum = 3;
y = 0;
For[i = 1, i ≤ elnum,
Show[Graphics[{Hue[0.55],
Rectangle[{0, y}, {4, y + 1.5}],
RGBColor[1, 1, 1], Rectangle[{0.2, y +
0.2}, {3.8, y + 1.3}]}], AspectRatio ->
Automatic, ImageSize -> {100, Automatic}];
i++, y = y + 2.5];
What I end up with is 3 rectangles as 3 separate graphic objects. Obviously, this happens becouse I use the Show command three times.
What I want to know is either how i can merge these 3 objects into one (and export it as a single object in a bitamp so it can be later used as a card), or how to still use the For loop but use the Show command just once to generate all three Rectangles into a single graphics object?
I hope you understand my question and will be able to help. Thanks.
URL: , |
|