×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Tracking points on a rigid body when rot, and trans for c.g. are known

Tracking points on a rigid body when rot, and trans for c.g. are known

Tracking points on a rigid body when rot, and trans for c.g. are known

(OP)
Hello all,
I've created a 3D simulation of a system I'm working on.  I can easily output the main bodies rotation (all three axis) and translation (x,y,z).  Getting my program to keep track of points on the body is a pain.  I'm thinking that I can just write a matlab program that uses the points (relative to the C.G) and the translation, rotation files to come up with the displacements of the points on the body.

I was thinking that:
DeltaX = deltaCGx-(z*roty-Y*rotz)
DeltaY = deltaCGy-(x*rotz-z*rotx)
DeltaZ = deltaCGz-(y*rotx-x*roty)
where Delta X is my point of interest x displacement
deltaCGx is the CG x displacement (read from file)
x, y, z = coordinates of points of interest
rotx = rotation about x axis.

Any one have any thoughts?  Any other ideas on how to do this?   Thanks
 

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

generally sounds fine but ...
1) not sure about your signs (+ve roty*+veZ = +vedeltax, no?); and
2) shouldn't there be a cosine/sine term in there, ie deltaX = Z*cos(rotY)

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

(OP)
Thanks for responding rb1957,
I'll take a look at my signs again, thought that I had them right, right hand rule and all.  
As for second part I'm basically thinking that say I rotate about the y axis .1 rads, now find the translation this causes in the x direction. The X displacement (opposite leg) can be found by taking the z coord (adjacent leg, z distance from c.g.) and multiplying it by the tan of the angle of the rotation (roty)  Since I'm looking at very small rotations I didn't include the tan function (tan .06 = .0600721).  

what do you think?  If there's a simpler solution that takes advantage of matlabs capabilities I'd really like to hear about it

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

You should probably read Quaternions and Rotation Sequences, by Kuipers, Princeton University Press, 1999.

First, you need to determine whether you're using a right-handed coordinate system, or not.  Either way, you need to be absolutely consistent.  You need to determine the rotation sequence, be it yaw, pitch, roll, or whatever.  Either way, you need to be absolutely consistent.

You need to at least do the full rotation matrices, and pick either the correct sequence, and stick with it, or, you need to use quaternions.

You should avoid using the approximations, because despite what you say or think now, you'll do something in the future that's going cause all the approximations to blow up the matrices, and you'll have to fix it after the fact.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

(OP)
You were right about having to do the full rotational matrices.  And as I found out the hard way the order of wrapping is crucuial.  For others that are out there just go with a direction cosine matrix transformation and be done with it.  A little more typing at the start but the results matched perfectly with my model.   

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

Shockdesigner331 - the advice that IRstuff gave, use quaternions, is the very best way to go although Kuipers book is not very helpful in learning to use quaternions to perform rotation mathematics.  There is very little literature that will actually help you learn quaternion basics.  Quaternions are simple in concept and simple to use once the fundamentals are understood.  Best of luck.

RE: Tracking points on a rigid body when rot, and trans for c.g. are known

A famous mathematician once described quaternions as an invention of the devil, or something like that.



 

Cheers

Greg Locock

SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources