|
|
This should put the center of two triangles
together by moving one to the origin,
rotating with Reorient_Trans, then moving
it to the other triangles center.
#include "transforms.inc"
#macro Normal_Of_Triangle(A, B, C)
vnormalize(vcross(B-A,C-A))
#end
#macro Center_Of_Triangle(A, B, C)
((A+B+C)/3)
#end
#macro Align_By_Triangles(A,B,C,D,E,F)
translate -Center_Of_Triangle(A, B, C)
Reorient_Trans(Normal_Of_Triangle(A, B, C),
Normal_Of_Triangle(D, E, F))
translate Center_Of_Triangle(D, E, F)
#end
Post a reply to this message
|
|