If both ends of the string are attached you can use 2 trackers and some trig functions (page 994 shake manual).
Here's an example script.
Color1 = Color(1920, 1080, 1, 0, red, red, 0, 0);
String = Color(700, 2, 1, 1, 1, 1, 1, 0);
Scale1 = Scale(String, distance(Tracker1.track1X,Tracker1.track1Y,Tracker1.track2X,Tracker1.track2Y)/width,
2, 0, height/2, 0, 0.5, 0);
Tracker1 = Tracker(0, "1", "1/64", "luminance", 0.75, "use start frame",
0.5, "stop", 1, 1, "v2.0", 0.3, 0.59, 0.11, 0, 10, "track1",
Hermite(0,[937.82,0,0]@1), Hermite(0,[433.693,0,0]@1), Hermite(0,[1,0,0]@1),
901.820251, 973.820251, 397.6929, 469.6929, 865.820251, 1009.82031,
361.6929, 505.692871, Hermite(0,[937.82,0,0]@1), Hermite(0,[433.693,0,0]@1),
1, 1, "track2", Hermite(0,[1181.52,97.35,97.35]@1), Hermite(0,[650.638,98.28,98.28]@1),
Hermite(0,[1,0,0]@1), 1145.53162, 1217.53162, 614.6379, 686.6379,
1109.53162, 1253.53162, 578.6379, 722.6379, Hermite(0,[1181.52,97.35,97.35]@1),
Hermite(0,[650.638,98.28,98.28]@1), 1, 1);
Rotate1 = Rotate(Scale1, atan2d((Tracker1.track2Y-Tracker1.track1Y),(Tracker1.track2X-Tracker1.track1X)),
1, 0, height/2, 0, 0.5, 0);
Pan1_track1 = Pan(Rotate1, NRiScript1.Tracker1.track1X, NRiScript1.Tracker1.track1Y,
0, 0.5, 0);
Under1 = Under(Color1, Pan1_track1, 0, 0, 0);
If you view the Under node and select the Tracker parameters, by moving either tracker the string will move
with them.
The Rotate node uses the atan2d(y,x) function to calculate the angle between the 2 trackers and
the Scale node uses the distance(x1,y1,x2,y2) function to calculate the distance between the 2 trackers.
Cheers, Alan.