| Author |
Comment/Response |
rhythmiccycle
|
03/18/12 00:58am
Here is an example of what I'm trying to do:
[code]
seg = 1/30;
{Slider[Dynamic[theta], {seg, 4.5 Pi, Pi*seg + .3}], Dynamic[theta]}
xAxis = Graphics[{Black, Thick, Arrow[{{0, 0}, {1, 0}}]}];
yAxis = Graphics[{Black, Thick, Arrow[{{0, 0}, {0, 1}}]}];
endPoint = {6, 0};
a = .5;
o = {0, 0};
AB = {0, a};
Dynamic[cycloide =
ParametricPlot[{a*t - a*Sin[t], a - a*Cos[t]}, {t, 0, theta}]]
Dynamic[OA = {a*theta, 0}]
Dynamic[BP = {-a*Sin[theta], -a*Cos[theta]}]
Dynamic[OP = OA + AB + BP]
Dynamic[fullLine = Graphics[{Black, Thick, Line[{o, endPoint}]}]]
Dynamic[circle = Graphics[Circle[{a*theta, a}, a]]]
Dynamic[lineOP = Graphics[{Black, Thick, Line[{o, OP}]}]];
Dynamic[lineRad = Graphics[{Black, Thick, Line[{{a*theta, a}, OP}]}]]
Dynamic[Show[circle, fullLine, xAxis, yAxis, lineRad, cycloide]]
[/code]
The code works, but I only want the final "Show[]" to display. but when I put semicolons in the previous line, the dynamics don't work.
URL: , |
|