I wrote down some problem, but suddenly have a stuck. Consider following code :

 {{a,{{-1, 0}, {5, 0}}}, Locator}, {w, {0, 5}, {5, 7}]

Now I've wanted to change the color of lines with ColorSlider. Remove Red and add Setting[ColorSlider[Red]]. But that doesn't get me a ColorSlider.

I tried something different, but there was only mistakes. Please give me an example of right writing way!

Sorry for terrible code and (maybe) easy answer. I'm just a newcomer.

  • $\begingroup$ Your code does not run. Please fix syntax errors. $\endgroup$
    – Edmund
    May 23 '18 at 23:27
Manipulate[Graphics[{col1, Line[a], Line[{a[[2]], w}], Line[{a[[1]], w}],
   col2, PointSize[Large], Point[w], Point[a]}, PlotRange -> {{-7, 7}, {-5, 7}}], 
 {{a, {{-1, 0}, {5, 0}}}, Locator}, {w, {0, 5}, {5, 7}}, 
 {{col1, Orange}, ColorSlider}, {{col2, Red}, ColorSlider}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.