POV-Ray : Newsgroups : povray.advanced-users : Request: transform from a rectangle. : Re: Request: transform from a rectangle. Server Time
29 Jul 2024 08:18:39 EDT (-0400)
  Re: Request: transform from a rectangle.  
From: Greg M  Johnson
Date: 29 Sep 2002 14:38:07
Message: <3d97488f$1@news.povray.org>
Thanks all for the consideration and help. When this project wins a SIGGRAPH
prize, I'll make sure your names are in the commented listing I provide the
press.    ;-)


The newx & newz were switched re: my convention.  It works well.  Will start
a new anim.
 I got compliments on the bounciness of my earlier,  "sloppy" algorithm; I
wonder if this one will be less impressive, although it will allow me to
design fancier engines & cars.

About every three years, I come to the conclusion that the Reorient macros
require rolling in the reorientation, but the only time I see such a
phenomenon is in hopelessly complicated code that I wouldn't have anyone
else wade through....


#macro AlignToRect2(pAb, pAf, pBf, pBb)  // by  Charles Fusner and Slime
     #local newz = vnormalize(pAf-pAb);
     #local newx = vnormalize(pBb-pAb);
     #local newy = vcross(newx,newz);

     matrix <
         newx.x,newx.y,newx.z,
         newy.x,newy.y,newy.z,
         newz.x,newz.y,newz.z,
         pAb.x, pAb.y, pAb.z
     >
#end


Post a reply to this message

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