|
|
On Wed, 19 May 1999 16:38:53 GMT, Jeff Lee wrote:
>I'm trying to write a macro that takes three points, and creates a plane
>which is rotated and translated to intersect all three points. Now, I
>think I've figured out how to get the normal of the triangle described
>by the points, but I'm not sure exactly how to turn that into an angle.
You don't need an angle. You don't need to rotate or translate.
A plane is defined by its normal and offset, so just find those:
This is untested, but if it's wrong it's probably just by a sign
somewhere.
#macro MakePlane(a,b,c)
#local n=vnormalize(vcross((b)-(a),(c)-(a)));
#local o=vdot((a),n);
plane {n,o}
#end
Post a reply to this message
|
|