|
![](/i/fill.gif) |
Hi Tor Olav,
Tor Olav Kristensen wrote:
> Here is a slightly modified version of that macro:
>
>
> #macro ThreePoint_Trans(pA1, pB1, pC1, pA2, pB2, pC2)
>
> #local vY1 = vnormalize(pB1 - pA1);
> #local vZ1 = vnormalize(vcross(pC1 - pA1, vY1));
> #local vX1 = vcross(vZ1, vY1);
> #local T1 = transform { Matrix_Trans(vX1, vY1, vZ1, pA1) inverse }
> #local vY2 = vnormalize(pB2 - pA2);
> #local vZ2 = vnormalize(vcross(pC2 - pA2, vY2));
> #local vX2 = vcross(vZ2, vY2);
> #local T2 = transform { Matrix_Trans(vX2, vY2, vZ2, pA2) }
>
> transform { T1 T2 }
>
> #end // macro ThreePoint_Trans
>
>
> Tor Olav
Nice. I used the Shear_Trans() macro because that's what the
Point_At_Trans() macro used, I didn't think to use the Matrix_Trans() to
do the shear and translate in one go. Kudos to you :-)
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |