If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Some question about transformation

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:

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?

Re: Some question about transformation

Hello, in the figure (b) the plane is rotated, but my eye is positioned in the same place i.e. (0, 0, 1) as in Figure (b). My goal is that the plane should look square like Figure (a) after rotation. I would like to know how that can be done. Thanks in advance.