|
|
Bob Frew <bob### [at] ntlworldcom> wrote:
> For any line with p1 and p2 as the end points to translate/rotate as
> necessary to put
> p1 at <0,0,0> and p2 on the x axis
> I need to then know necessary translate/rotate to be able to put them
> back.
transforms.inc has some useful macros for this sort of thing (see
http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_9_1_29).
For example, you could do
translate -p1 Reorient_Trans(p2-p1, x)
then
Reorient_Trans(x, p2-p1) translate p1
It would be useful to know the wider context of what you're trying to do. There
might be a larger elegant solution that helps even more!
Bill
Post a reply to this message
|
|