|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greetings,
So I want to rotate an object on an axis that I declare, without having
to adjust for length. For instance I have an object that's called LeftArm.
It is the union of two cylinders, and I would like to rotate it around the
vector previously #declared as LeftShoulder.
From reading the Vector Functions Page of the help documentation, I
think vaxis_rotate() will perform this for me, but I haven't been able to
make it work . Unfortunately there are no examples on this topic that I
could find.
How can I do what I am trying to do? Could you give some working examples?
Thanks so much,
Robert
--
ill### [at] arinet
http://www2.ari.net/illos
ICQ: 1690749
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have a working example in a mannequin
if you you want to see the code. The easiest
way I know is something like this:
#declare the object you want to rotate
with the "joint" at <0,0,0>
then apply any rotations
Then translate the object into place.
Robert Kirkpatrick wrote:
> Greetings,
>
> So I want to rotate an object on an axis that I declare, without having
> to adjust for length. For instance I have an object that's called LeftArm.
> It is the union of two cylinders, and I would like to rotate it around the
> vector previously #declared as LeftShoulder.
>
> From reading the Vector Functions Page of the help documentation, I
> think vaxis_rotate() will perform this for me, but I haven't been able to
> make it work . Unfortunately there are no examples on this topic that I
> could find.
>
> How can I do what I am trying to do? Could you give some working examples?
>
> Thanks so much,
>
> Robert
>
> --
> ill### [at] arinet
> http://www2.ari.net/illos
> ICQ: 1690749
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 19 Nov 1999 09:41:30 -0400, "Robert Kirkpatrick"
<ill### [at] arinet> wrote:
>Greetings,
>
> So I want to rotate an object on an axis that I declare, without having
>to adjust for length. For instance I have an object that's called LeftArm.
>It is the union of two cylinders, and I would like to rotate it around the
>vector previously #declared as LeftShoulder.
>
> From reading the Vector Functions Page of the help documentation, I
>think vaxis_rotate() will perform this for me, but I haven't been able to
>make it work . Unfortunately there are no examples on this topic that I
>could find.
>
>How can I do what I am trying to do? Could you give some working examples?
>
>Thanks so much,
>
>Robert
From John VanSickle's Matrix Page:
--------------------------------
Rotating around an arbitrary axis: The standard rotate transform
rotates around the x, y, and z axes. It is possible, however, for the
axis of rotation to lie along any vector, and not just the major axes.
The vaxis_rotate(A,B,f) function allows you to rotate a point around
any axis, but there is no standard transform for such an operation on
an object. A couple of properly-designed matrices and a snippet of
scene code will do the trick:
#local VX = vnormalize(V); // assuming that V is the axis of
rotation
#local VY = vnormalize(vcross(VX,<VX.y,VX.z,-VX.x>));
#local VZ = vnormalize(vcross(VX,VY));
object { MyObject
matrix < VX.x,VY.x,VZ.x,
VX.y,VY.y,VZ.y,
VX.z,VY.z,VZ.z,
0, 0, 0 >
rotate x*Angle // here Angle is your angle of rotation
matrix < VX.x,VX.y,VX.z,
VY.x,VY.y,VY.z,
VZ.x,VZ.y,VZ.z,
0, 0, 0 >
}
--------------------------------
I hope this is what you're looking for.
Peter Popov
ICQ: 15002700
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Robert Kirkpatrick wrote:
> So I want to rotate an object on an axis that I declare, without having
> to adjust for length. For instance I have an object that's called LeftArm.
> It is the union of two cylinders, and I would like to rotate it around the
> vector previously #declared as LeftShoulder.
Not quite certain what you mean.
But as a general procedure create every part of an object at
0,0,0 then rotate and translate into position and then rotate and
translate the finished object into position. But do the movements
at 0,0,0 prior to any rotations or translations. Do then from the
"inside out" such as shoulder, upper arm, lower, arm, hand,
fingers. That gives you the new endpoint always calculatable from
the previous so you know where to translate it to.
--
<blink>---please--don't---</blink>
http://www.giwersworld.org/artiii/
Oh my God! They've rendered Kenny!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|