POV-Ray : Newsgroups : povray.general : alignment! : Re: alignment! Server Time
10 Aug 2024 07:22:31 EDT (-0400)
  Re: alignment!  
From: Josh English
Date: 11 Feb 2000 10:26:43
Message: <38A42A3C.96CE2FC2@spiritone.com>
Are you saying that the first cylinder has two known endpoints and you want
to make a cylinder of the same length along the x axis? In that case, you'd
want to calculate vlength(p2 - p1) where p1 and p2 are the endpoints of the
first cylinder.

If you want the cylinder at the origin to be the same length and go in the
same diretion, use <0,0,0> and p2 - p1 as the endpoints.

If I'm way off it's because I'm not clear as to what you're asking.
Hopefully Peters' suggestion to look at John VanSickles matrix page will
help. Perhaps if you posted some code we could see what you want and what
you're getting...

Josh



> hi!
> I have a cylinder with known xyz's coordinates and I want to align
> (rotate then translate?) a cylinder the same length positioned in
> (0,0,0) (length,0,0). I can get the angles around X, Y, and Z axis, but
> when I apply these angles to my origin cylinder I don't get the right
> alignment.
> Thanks in advance for your help!!
> sa

--
Josh English
eng### [at] spiritonecom
"May your hopes, dreams, and plans not be destroyed by a few zeros."


Post a reply to this message

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