POV-Ray : Newsgroups : povray.general : alignment! : Re: alignment! Server Time
10 Aug 2024 07:18:24 EDT (-0400)
  Re: alignment!  
From:
Date: 14 Feb 2000 12:30:46
Message: <38A83C7A.D03E840E@relaq.mx>
thanks josh.
i have two identical cylinders. one is somewhere in space (i know xyz of the
end points), the other one is at the origin and along the x axis (one end point
is [0,0,0]; the other end point is [length,0,0]). i need to align the second
one with the first one by means of rotations and translations.
i'm trying to do it with matrices but any help is appreciated.
thanks,
sandra


Josh English wrote:

> 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.