• Create Account

We're offering banner ads on our site from just \$5!

# jenny_wui

Member Since 12 Jan 2013
Offline Last Active Jul 01 2014 06:44 PM

### Some clarification about inversing rotation only around particular axes

29 June 2014 - 07:53 PM

Suppose, I have a given matrix. I only need to inverse the rotation around z-axis and the rotation around y-axis keeping the rotation around x-axis intact (without any change). I am a bit confused about what changes in unit matrix needed to be done so that if I multiply the given rotation matrix by that unit matrix, I can get the needed transformation.Could anyone give some clarification.

08 April 2014 - 04:59 PM

Hello, I think my previous postings were a bit confusing. I just wanted to clarify that in this posting. I have a plane and attached figure shows two positions of the plane, (a) no rotation and (b) with rotation where rotation axis is defined by ax + by + cz.

Now, the plane will rotate, but it will always look without rotation as shown in figure (a).

I think I need to play around with my glutReshape function which looks like follows:

/*******************************/
void glutReshape(int width, int height)
{

width = glutGet(GLUT_WINDOW_WIDTH);
height = glutGet(GLUT_WINDOW_HEIGHT);

if (width && height)
{
glViewport(0, 0, width, height);

nearDist = 150.0 / tan((kFovY / 2.0) * kPI / 180.0);
farDist = nearDist + 100.0;
aspect = (double) width / height;

glMatrixMode(GL_PROJECTION);
gluPerspective(kFovY, aspect, 0.1, farDist+20);

glMatrixMode(GL_MODELVIEW);

gluLookAt( 0.0, 0.0, (nearDist + 5.0), // camera/ eye
0.0, 0.0, 0.0, // center
0.0, 1.0, 0.0); // up vector

}
}
/*******************************/
But I fail to correctly manipulate it. When rotation axis will move from (0, 0, 1) to (ax + by + bz), the eye/ camera will be changed from ( 0, 0, nearDist +5) to {(nearDist+5)*ax, (nearDist+ 5)*ay, (nearDist + 5)*az}. Is it right?

But what about the up vector? How will it change for this rotation? How can I calculate new up vector? Also what other parameters in my glutReshape function needs to be changed?

Please provide me some suggestion so that I can fix this problem.

### Some continuation of my previous posting on transformation

07 April 2014 - 07:15 PM

Hello, this is some continuation of my previous posted topic on transformation. I have attached two pictures of rotation of different axes, i.e. X, Y and Z. Z rotation is the projection on XY plane for two different Z rotation. It shows how the length of the axis varies depending on Z rotation. Now my question is, from this information is it possible to figure out rotation of Z axis. Here as rotation is on XY plane, the length of X and Y axis does not vary, but that of Z-axis varies.

### Need some suggestions about transforming a projected image

02 April 2014 - 07:14 PM

Hello every body,
I have an image outline of lips (please find attached picture) that shows the projection on xy plane when aligned. Now from that projected image is it possible to get the straight look as shown in the bottom of figure? What information do I need to get the straight image at bottom from the aligned image at top.