POV-Ray : Newsgroups : povray.general : Rotation with axis location specified? Server Time
1 Nov 2024 12:25:29 EDT (-0400)
  Rotation with axis location specified? (Message 1 to 4 of 4)  
From: Andrew Sumner
Subject: Rotation with axis location specified?
Date: 16 Jul 2000 20:15:41
Message: <3972502A.6B8EC604@bigfoot.com>
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?

I apologise if this is a naive question - I'm new to Povray.

Cheers,
-Andrew


Post a reply to this message

From: John VanSickle
Subject: Re: Rotation with axis location specified?
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

From: Andrew Sumner
Subject: Re: Rotation with axis location specified?
Date: 16 Jul 2000 21:11:37
Message: <39725D45.F298BD4D@bigfoot.com>
Found solution in previous posts to this newsgroup.

Cheers,
-Andrew


Post a reply to this message

From: Andrew Sumner
Subject: Re: Rotation with axis location specified?
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.