POV-Ray : Newsgroups : povray.general : Transformation to align two axes? : Transformation to align two axes? Server Time
30 Jul 2024 10:23:35 EDT (-0400)
  Transformation to align two axes?  
From: CShake
Date: 11 Mar 2009 20:26:33
Message: <49b856b9$1@news.povray.org>
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.

transforms.inc has the Point_At_Trans(newY) that will do half this 
problem, but if I want to then rotate the x axis to align with another 
vector, it will mess up the original translation.

The object can then be translated to be centered at a given point, but 
that part is easy.


Post a reply to this message

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