inline void frenet(const V3& p2, const V3& p1, const V3& p0, V3& t, V3& n, V3& b){	
	V3 d1 = (p0 - p2);			// 1st (central) difference (scaled by 2)
	V3 d2 = (p0 - p1*2. + p2);	// 2nd difference
	frenet(d1,d2, t,n,b);
}
Example #2
0
void frenet(const V3& p2, const V3& p1, const V3& p0, V3& t, V3& n, V3& b){
	//const V3 d1 = p0 - p1, d2 = d1 - (p1 - p2);
	const V3 d1 = (p0 - p2)*0.5;
	const V3 d2 = (d1 - p1)*2.0; // p0 - 2*p1 + p2 = p0 - p2 - 2*p1 = 2*d1 - 2*p1
	frenet(d1,d2, t,n,b);
}