Spline tangents math

Hi,

I want to set the tangents of an animation curve to a specifix value based on the shape of a triangle. I have the following inputs.

A
|
|
B----------------------------------------------C

I have the position of A, B and C, and thus all lengths. The distance between B and C changes, while other values are constant (including the 90 degree angle at .

What I want to do is have A aim at C in one axis (just think of this a 2d thing). I'm setting up driven keys via MEL to do this, and was wondering if there was a way to get the correct values for the tangents to have this work correctly (mathematically this should be possible...right?).

Currently I'm using multiple keyframes set up manually on the driven key, but it's not as accurate and more messy.

Thanx,

Ragnar