The
Blobs Go Marching Two by Two
Listing
2. Finding the Intersection Point.
void
FindIntersection( tVector *a, tVector *b,
float aVal, float bVal,
float thresh, tVector *result)
{
/// Local Variables ////////////////////////////////////
tVector diff;
float ratio;
////////////////////////////////////////////////////////
VectorSubtract( a, b, &diff);
ratio = (thresh - aVal) / (bVal - aVal);
VectorMultiply( &diff, ratio);
VectorSubtract(a,&diff,result);
if (aVal > bVal)
}
________________________________________________________
Back
to Article