POV-Ray : Newsgroups : povray.binaries.animations : Fixed train : Re: Fixed train Server Time
19 Jul 2024 09:14:48 EDT (-0400)
  Re: Fixed train  
From: Greg M  Johnson
Date: 8 Feb 2003 17:20:20
Message: <3e4582a4@news.povray.org>
dang!

I thought I noticed this before, but you're right.

I find four new corners for the cars based on the rails and then use this
reorient macro:

#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);
     #local avey=(pAb+pAf+pBf+pBb)/4;

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


Post a reply to this message

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