POV-Ray : Newsgroups : povray.general : Rotation with axis location specified? : Re: Rotation with axis location specified? Server Time
9 Aug 2024 13:19:26 EDT (-0400)
  Re: Rotation with axis location specified?  
From: Andrew Sumner
Date: 16 Jul 2000 21:15:58
Message: <39725E4A.C75F851@bigfoot.com>
John VanSickle wrote:

> Andrew Sumner wrote:
> >
> > Hi, I'm not sure I can describe this correctly, but here goes..
> >
> > I have a complex CSG (a human arm) that I'd like to rotate
> > at the shoulder.  Unfortunately, the standard rotate command
> > will turn it at the center of the object, which moves the shoulder
> > way off beam, requiring painstaking translate experimentation to
> > get it back to where it should be.
> >
> > Is there a macro or method for specifying where the rotation
> > axis should be for an object, rather than it using the object's
> > center?
>
> So you want to rotate around a point other than the origin (which is
> at <0,0,0>)?  Do it this way:
>
>   translate -Center_of_Rotation
>   rotate RotationVector
>   translate Center_of_Rotation
>
> Since rotation is always around the origin, to rotate around another
> point, move stuff from that point to the origin, rotate it, and then
> move it back.
>
> It is generally easier to prevent this trouble by designing your objects
> at the origin, rotating them, and then moving them to where you want
> them.

Yes, that does help.  I've also just discovered your excellent
matrix page, which has the exact solution to the problem.

Many thanks,
-Andrew


Post a reply to this message

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