POV-Ray : Newsgroups : povray.general : alignment again. : Re: alignment again. Server Time
10 Aug 2024 07:21:25 EDT (-0400)
  Re: alignment again.  
From: Sandra Antúnez
Date: 21 Feb 2000 01:32:48
Message: <38B0DCDA.4A5FE9BC@relaq.mx>
ok. and what is and where can I get the megapatch?
thanx,
sa

Mark Wagner wrote:


> >hi all!
> >I have to align a three point object (with point1 in <0,0,0>, point2 in
> ><x,0,0>, and point3 in <x,y,0>), with an identical three point object in
> >space (with known xyz coordinates for the three points). is there an
> >easy way to do it (like the reorient macro in the vansickle page)? or a
> >not so simple one?
> >thanx,
> >sa
>
> If you are using the MegaPatch, the following will work:
> #declare V1 = point2-point1; /* These are the points of the object */
> #declare V2 = point3-point1;
>
> #declare New1 = NewPoint2 - NewPoint1; /* NewPoint1, NewPoint2, NewPoint3
> are the positions you want to move the object to */
> #declare New2 = NewPoint3 - NewPoint2;
>
> object{MyObject
>   REORIENT(V1, New1) /* This is VanSickle's Reorient macro, or anyone else's
> reorient macro */
>   REORIENT(vtransform(V2,_REORIENT(V1, New1)), New2)
> }
>
> This will also work without the MegaPatch, but you will need to figure out
> the math for the vtransform function yourself.
>
> Mark


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.