# Creating a line graph using the Manipulate command.

Posted 10 years ago
2803 Views
|
|
2 Total Likes
|
 The beginning of the question asks:Using two-dimensional (Graphics[]), create a straight Line[] with points that divide it into twelve equal-length segments. Use the option VertexColors with alternating colors. This will help you see where the vertices (your points) are. This will help you keep track of what you are doing in the next step. Use the points that define this line as your initial vertices. I have.Graphics[{Thin, Line[{{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}}, VertexColors -> {Red, Blue, Orange, Green, Red, Blue, Orange, Green, Red, Blue, Orange, Green}]}]The second part, which is the part I am having trouble with asks.Using two-dimensional (Graphics[]), create a straight Line[] with points that divide it into twelve equal-length segments. Use the option VertexColors with alternating colors. This will help you see where the vertices (your points) are. This will help you keep track of what you are doing in the next step. Use the points that define this line as your initial vertices.   I haveManipulate[Plot [Thin, Line[{{1/(1 - a*f), 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12/(a*f), 0}}], {f, 0, 1}], {a, 0, 1}]I am not sure how to make this work.  I went on the Mathematica help site for the manipulate command and tried to make my graph appear in the form written and this is what I get.  Not sure why it wants more expressions.  I didn't even want to add the "a" in.