Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extrapolated null position based on two tracked points

4 views
Skip to first unread message

Navarro...@adobeforums.com

unread,
Mar 13, 2009, 1:49:02 PM3/13/09
to
The photo is pretty self-explanatory. If I have two tracked points, how can I determine the coordinates for a third position? I plan on wiring the distance of the extrapolated null to a slider to control the distance from the tracked points.

<http://s175.photobucket.com/albums/w134/navstar/?action=view&current=extrap-null.jpg>

Myle...@adobeforums.com

unread,
Mar 16, 2009, 9:01:01 AM3/16/09
to
Determine the angle based on teh difference, then use it to drive sinus and cosinus:

Radius=thisLayer.effect("Slider")("Slider");

A=thislayer.Tracker("A").featureCenter;
B=thislayer.Tracker("B").featureCenter;

DiffX=B[0]-A[0];
DiffX=B[1]-A[1];

Ang=Math.atan2(DiffY,DiffX);

X=Math.cos(Ang)*Radius;
Y=Math.sin(Ang)*Radius;

[X,Y]

Mylenium

Dan_E...@adobeforums.com

unread,
Mar 16, 2009, 9:38:42 AM3/16/09
to
You can simplify the math a little if you keep everything as vectors:

slider = effect("Slider Control")("Slider");
T1 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 1").attachPoint;
T2 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 2").attachPoint;
T1 + normalize(T1-T2)*slider

Dan

Navarro...@adobeforums.com

unread,
Mar 16, 2009, 3:37:46 PM3/16/09
to
You guys are awesome! $$$ (or €€€) for the tip jar! :)

Navarro...@adobeforums.com

unread,
Mar 17, 2009, 2:56:59 PM3/17/09
to
That works great. Now how would I keep null rotation matched based on the vector formed by the two trackers?

Myle...@adobeforums.com

unread,
Mar 18, 2009, 3:20:54 AM3/18/09
to
You simply use the angle my formula spits out --> radiansToDegrees(Ang). You may just need to add 180 degrees to reverse it...

Mylenium

Navarro...@adobeforums.com

unread,
Mar 24, 2009, 3:45:50 PM3/24/09
to
Thanks -- I'll try it!
0 new messages