I am confused by Dynamic. I am trying to slide a tangent line along a curve, without using DynamicModule, so that I can include it in a cdf. I have the sliding point working in the below, but the tangent line is static. How do I get the line moving as well?
LocatorPane[
Dynamic[pt],
plot1 = Plot[Sin[x], {x, 0, 10},
Epilog -> {
PointSize[Large],
Point[Dynamic[{First[pt], Sin[First[pt]]}]]
}];
TangentAngle = Cos[First[pt]];
x1 = First[pt] - 0.5*Cos[TangentAngle];
y1 = pt[[2]] - 0.5*Sin[TangentAngle];
x2 = First[pt] + Cos[TangentAngle];
y2 = pt[[2]] + Sin[TangentAngle];
plot2 = Graphics[Line[{Dynamic[{x1, y1}], Dynamic[{x2, y2}]}]];
Show[{plot1, plot2}], Appearance -> None
]




