Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.2K Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plot a specific graph by repeating this function 50 times?

Posted 9 years ago

So I need to start with a horizontal line length of x=10. I have two fixed angles a=42 b=40 and another horizontal length y =5. I need to draw a sequence of the horizontal lines length [x,y,x,y,x,y..... ], then I have to merge the angles to the lines [a, b, 2a, 2b, 3a, 3b,.....] so the length x has to match with a, while b with y. I need to produce a graph by repeating this function 50 times.

I have produced so far

Flatten[Table[{x, y}, {50}]] 

Creates a list of the length [10,5,10,5,10,5....]

Times @@@ Tuples[{Range[50], {a, b}}] 

This creates the list for the angle [42, 40, 84, 80, 126, 120,.....] this is in degrees I'm not sure on how to match 42 with 10, 40 with ,84 with 10 and so on? Need help. Thank you.

POSTED BY: Mike Blanco
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard