DJ_AM_Juicebox
asked on
rotation of a vector
Hi everyone,
I have a bizarre image system where for an image, I get the cosines of the upper left pixel to the world coordinate system. These values are describing the direction of the columns and rows to the world coordinate system. I guess it's like trying to describe the direction of the upper edge and left edge of a plane in 3D space.
For example, I have a sample image with cosines of:
cols: 0/0/-1
rows: 0/1/0
which means the columns of the image are running down the negative z axis, and the rows are running up the positive y axis.
My question is, how could I figure out the resulting cosine direction would be if I apply an arbitrary rotation to the columns for example? If I apply a 90 degree rotation around some axis, what would the cols cosine turn out to be?
Thanks
I have a bizarre image system where for an image, I get the cosines of the upper left pixel to the world coordinate system. These values are describing the direction of the columns and rows to the world coordinate system. I guess it's like trying to describe the direction of the upper edge and left edge of a plane in 3D space.
For example, I have a sample image with cosines of:
cols: 0/0/-1
rows: 0/1/0
which means the columns of the image are running down the negative z axis, and the rows are running up the positive y axis.
My question is, how could I figure out the resulting cosine direction would be if I apply an arbitrary rotation to the columns for example? If I apply a 90 degree rotation around some axis, what would the cols cosine turn out to be?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi DJ_AM_Juicebox,
Do you have a 2D-game and a fixed rotation-axis, like the z-axis? or is your rotation axis any axis in
3D-space, even everything else than x,y or z-axis?
If so, how do you store the rotation & its axis? Euler-Angles, Axis-Angle or Quaternions?
ike
Do you have a 2D-game and a fixed rotation-axis, like the z-axis? or is your rotation axis any axis in
3D-space, even everything else than x,y or z-axis?
If so, how do you store the rotation & its axis? Euler-Angles, Axis-Angle or Quaternions?
ike
I highly recommend ozo's link for you too! Also make sure to understand rotation and its axis and
how we can store and calculate it:
http://www.euclideanspace.com/maths/geometry/rotations/
how we can store and calculate it:
http://www.euclideanspace.com/maths/geometry/rotations/
Hi,
Can you describe the image system you are reffering to?
I never saw a rotation defined just by cosines of angles.
The rotations are defined by angles. We use sin and cos of such angles to calculate the position of points around a given point (2D rotation) or around axis (3D rotation) or around an arbitrary line (also 3D rotation).
We can use matrix calculation or formulas to calculate the position of graphic entities after the rotation.
I don't remember if I had ever saw an image rotation defined by cosines in rows and collums. Which rows and cols? Is it a table? Are you sure is that an image? Which image? A bitmap? What are the entries and outputs in the system?
We need more info.
Jose
Can you describe the image system you are reffering to?
I never saw a rotation defined just by cosines of angles.
The rotations are defined by angles. We use sin and cos of such angles to calculate the position of points around a given point (2D rotation) or around axis (3D rotation) or around an arbitrary line (also 3D rotation).
We can use matrix calculation or formulas to calculate the position of graphic entities after the rotation.
I don't remember if I had ever saw an image rotation defined by cosines in rows and collums. Which rows and cols? Is it a table? Are you sure is that an image? Which image? A bitmap? What are the entries and outputs in the system?
We need more info.
Jose
Are your cosines not a table, but a matrix instead?
In such case, it is a matrix transformation very usual in computer graphics.
Jose
In such case, it is a matrix transformation very usual in computer graphics.
Jose
ASKER
Thanks