Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

3d vector determination problem

Hi, here's my problem

i have a point (x,y,z) which is a look-from point of a camera
and the angles around the axis (AngX,AngY,AngZ). I want to determine the vector of the direction of where the camera look, or the lookAt point.
I'm not good at all in mathematics
Help me Please
i hope my english is not too bad
Thkx


Comments

  • nightsurfernightsurfer Posts: 272Member
    OK, you're talking about some basic linear algebra. I'll try to explain this to you.
    If you have a point (x,y,z), and you also know the direction that it is facing,
    then you can express the entire statement as a single equation:
    r = (x, y, z) + t(a, b, c)
    where the (a, b, c) is a vector that describes the direction that the camera is
    facing, from the origin (0, 0, 0).
    So once you have worked out the simplest direction vector for the camera, then
    you have an equation of a line for the camera's view, and you can use that
    equation to find the point that is seen by the camera.
    To find any general point, then just replace t with a number and you will get a
    point, and if you have a point, see if it can fit into the equation, and if it can
    then the camera can see it.
    If you have any more problems with this, send an e-mail to
    yizk_man@hotmail.com

  • socket3dsocket3d Posts: 42Member
    : Hi, here's my problem
    :
    : i have a point (x,y,z) which is a look-from point of a camera
    : and the angles around the axis (AngX,AngY,AngZ). I want to determine the vector of the direction of where the camera look, or the lookAt point.
    : I'm not good at all in mathematics
    : Help me Please
    : i hope my english is not too bad
    : Thkx
    :

    There's an angle that doesn't affect the looking point, which is called roll angle. You must know the rotation order because this can affect the final result, and the axis system is important too because each one gives a different result. So you can give more details on your axis system and angles description and rotation order. For example the earth can be described with spherical coordinates system, and you can imagine the center is the look-from point of your camera, and one city in the surface is the looking point, so longitude and lattitude can give you the vector, for example the projection of that vector in the vertical axis of the earth gives you the Y component of your vector, so it can be
    R * sin ( latitude )



Sign In or Register to comment.