|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Found solution in previous posts to this newsgroup.
Cheers,
-Andrew
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|