jermie said:
Thanks:) Am working on sloshing in rectangular container subjected to horizontal, vertical and rotational excitation.
Am trying to formulate the boundary conditions incorporating the excitations in it. My problem now is I would like to write rotation component in terms of translation.
I'm not sure exactly what you are getting at, but I'll take a stab and say you're looking at rotating things about an arbitrary point.
To do this you basically subtract the "point of rotation" from all points you are rotating and then perform a rotation. I'll do the quick derivation for rotations in two dimensions.
Lets say you have an arbitrary point (x,y) that already has an angle theta. We want to rotate the point counterclockwise by adding an angle gamma so that basically the final point has the same length but is an at angle (theta + gamma).
From above we know that:
x = r cos(theta)
y = r sin(theta)
We want to find x' and y' (our new points) which are
x' = r cos(theta + gamma)
y' = r sin(theta + gamma)
We have trigonometric identities for addition of angles in sine and cosine (if you don't know what they are or how they are derived look them up on wiki).
So basically when we expand the x' and y' we get
x' = r * [cos(theta)*cos(gamma) - sin(theta) * sin(gamma)]
y' = r * [sin(theta)*cos(gamma) + sin(gamma)*cos(theta)]
x' = [r * cos(theta) ] * cos(gamma) - [r * sin(theta)] * sin(gamma)]
y' = [r * sin(theta) ] * cos(gamma) + [r * cos(theta)] * sin(gamma)]
Given that x = r * cos(theta) and y = r * sin(theta) we get the equations
x' = x * cos(gamma) - y * sin(gamma)
y' = y * cos(gamma) + x * sin(gamma)
and that is rotation in two dimensions.
This assumes that you're rotating the point about (0,0) but like I said above if you want to rotate the points about an arbitrary point [ say (a,b)] you do the following:
1) Subtract (a,b) from all points
2) Rotate the points using above
3) Add (a,b) back to all points
That's basically all there is to rotation in 2 dimensions. You can do it in three dimensions using the concepts for two dimensions but its actually better to use a rotation axis and an angle rather than doing '2d' rotation multiple times (ie Euler angles).