POV-Ray : Newsgroups : povray.general : Transformation to align two axes? : Re: Transformation to align two axes? Server Time
30 Jul 2024 10:15:34 EDT (-0400)
  Re: Transformation to align two axes?  
From: clipka
Date: 11 Mar 2009 22:30:01
Message: <web.49b872905a6edcc2801985dd0@news.povray.org>
CShake <cshake+pov### [at] gmailcom> wrote:
> I'm having trouble thinking through a transformation problem, and I'm
> pretty sure this isn't too crazy of a problem.
> The idea is that I have an object centered at the origin, let's say a
> thin oval with the major and minor radii along the x and z axes, (so the
> normal on the flat face is in y). I want to rotate this so the x and y
> axes are pointing in the direction of two arbitrary (normalized and
> perpendicular) vectors.

Why rotate when you can shear? :)

  transform { Shear_Trans(newX,VCross(newX,newZ),newZ) }

There. Shear_Trans is your friend, too :)


Post a reply to this message

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