POV-Ray : Newsgroups : povray.general : Rotation with axis location specified? : Re: Rotation with axis location specified? Server Time
9 Aug 2024 13:18:59 EDT (-0400)
  Re: Rotation with axis location specified?  
From: John VanSickle
Date: 16 Jul 2000 21:00:06
Message: <39725AAE.8E240E52@erols.com>
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.

Hope this helps,
John
-- 
ICQ: 46085459


Post a reply to this message

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