# Physics - Kinematics - Orientation - Discussion Forums: Open Discussion

By: nobody ( Nobody/Anonymous )
Physics - Kinematics - Orientation Comment
2003-04-09 20:35
After reading orientation page I have some comments on orientation. I am sure you already know this. Lookat function I have seen have an up vector. As long the vector from the eye to the lookat point is not parallel to the up vector you can find normals to build the new rotation matrix. Then to turn an object from the current rotation to the lookat rot you would interpolate between matrixes. I have only seen the interpolation along the shortest rotational path.

By: martinbaker ( Martin Baker )
RE: Physics - Kinematics - Orientation Comment
2003-04-10 02:29
Thanks for your message and for pointing out the relevance of the lookat function. I think it would be useful to put some code for lookat on this page (do you know of any copyright free code that I would be free to include here?) [I have now added this]

I think the example I was giving assumed that the observer was at the centre of the earth (in which case all directions are up), not a very practical example! Also perhaps this is starting to overlap with the discussion about defining coordinate systems:
https://www.euclideanspace.com/maths/geometry/coordinatesystems/index.htm

So perhaps, on this page, I should assume that there is already a coordinate system defined, and also a local coordinate system for the object. In which case defining the orientation becomes a question of relating the angles of the local coordinate system to the global coordinate system?

Thanks,

Martin

By: nobody ( Nobody/Anonymous )
RE: Physics - Kinematics - Orientation Comment
2003-04-13 17:28
I agree with what you have said here. Whenever you are using LookAt it implies you are moving from a known/current rotation to a new rotation. This is useful because every object will have a known rotation.