|
![](/i/fill.gif) |
On Mon, 09 Nov 1998 22:56:09 -0500, Greg M. Johnson <@aol.com> wrote:
>Thanks, but that web server for twyst's macro station now appears to be
>down. Could you post that tiny little macro here?
I can't get there either; Twyst has a broken CGI script. Here's an
adaptation of the code, as seen in my rounded cylinder macro. I've
changed all the 3.1-specific stuff to 3.02 stuff, so you can just
put this in an .inc file. #declare Orientation to be your desired
vector, include this, then use transform{trans} where you'd usually
use rotate. This assumes you used x as the original axis.
#declare vX2=vnormalize(Orientation);
#declare vY=vnormalize(vcross(x,vX2));
#declare vZ1=vnormalize(vcross(x,vY));
#declare vZ2=vnormalize(vcross(vX2,vY));
#declare trans=transform {
matrix < 1, vY.x,vZ1.x, 0,vY.y,vZ1.y, 0,vY.z, vZ1.z, 0,0,0 >
matrix < vX2.x,vX2.y,vX2.z, vY.x,vY.y, vY.z, vZ2.x,vZ2.y,vZ2.z, 0,0,0 >
}
Post a reply to this message
|
![](/i/fill.gif) |