Re: Повоpот в 3d

From
Ianos Gnatiuc (2:469/303.55)
To
Oleg Sysoev
Date
2002-07-28T11:46:09Z
Area
RU.ALGORITHMS
Hello Oleg.

25 Jul 02 20:42, you wrote to all:

 OS>  Но это в 2d. А как быть, если точка pасположена в 3d?
 OS>  Большая пpосьба поделиться со мной соответствyющей
 OS> литеpатypой/линком, либо готовым алгоpитмом. Очень хотелось бы
 OS> полyчить фyнкцию со входными паpаметpами, как glRotatef в opengl.



Харошаю литераруру по субжу можна наити в DirectX 5 SDK из MSDN
Library Visual Studio 6.0 а также покапаися в samples из MSVS. Если
есть возможность наиди DirectX 8 SDK. Там очень хорошии доки и
дастатачно много samples...


Зта из MSDN:

.....................

Rotation.


The transformations described in this section are for left-handed
coordinate systems, and so they may be different from transformation
matrices you have seen elsewhere. The following transformation
rotates the point (x, y, z) around the x-axis, producing a new point
(x1,y1,z1):

                         [ 1,   0,   0,  0]
                         [ 0,  cos, sin, 0]
[x1,y1,z1,1] = [x,y,z,1] [ 0, -sin, cos, 0]
                         [ 0,   0,   0,  1]

The following transformation rotates the point around the y-axis:

                         [cos, 0, -sin, 0]
                         [ 0,  1,   0,  0]
[x1,y1,z1,1] = [x,y,z,1] [sin, 0,  cos, 0]
                         [ 0,  0,   0,  1]

The following transformation rotates the point around the z-axis:

                         [ cos, sin, 0, 0]
                         [-sin, cos, 0, 0]
[x1,y1,z1,1] = [x,y,z,1] [  0,   0,  1  0]
                         [  0,   0,  0, 1]


Angles are measured clockwise when looking along the rotation axis
toward the origin.



Ianos

+++ SS Ianky          mailto: ssianky(at)<hotmail | yahoo>.com
--- GoldED+/W32 1.1.4.7
 * Origin: SS Ianky - (373-2) 534966 (2:469/303.55)