Message Boards Message Boards

0
|
3310 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Help with command Rectangle

Posted 10 years ago
Hi everybody, I hope all are well, my question is how do the following, I have the following list :
rec = {{0, 0}, {33, 27}, {33, 0}, {66, 27}, {66, 0}, {99, 27}, {99,
    0}, {132, 27}, {132, 0}, {157, 17}};
and the next thing I do
inter = Partition[rec, 2]
Rectangle[ #] & /@ inter
but the problem arises when trying to plot the previous output, can some  tell me why?, moreover  some solution. Greetings and thanks in advanced.
POSTED BY: Luis Ledesma
2 Replies
Posted 10 years ago
In[3]:= Map[Apply[Rectangle, #] &, inter]

Out[3]= {Rectangle[{0, 0}, {33, 27}], Rectangle[{33, 0}, {66, 27}],
Rectangle[{66, 0}, {99, 27}], Rectangle[{99, 0}, {132, 27}],
Rectangle[{132, 0}, {157, 17}]}
Is this what you are looking for?
And Graphics[%3] will give you the graphics output.  
POSTED BY: Girish Arabale
Posted 10 years ago
it's just what I need, thank you very much for helping
POSTED BY: Luis Ledesma
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract