<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92291</guid>
        <pubDate>Sat, 15 Mar 2003 14:26:33 +0000</pubDate>
        <title>Знатоки 3D-графики! Нужна матрица поворота...</title>
        <link>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92291</link>
        <description><![CDATA[AleXXKSyS: void Perspective(float &amp;sx,float &amp;sy,float &amp;sz)<br>{<br> &nbsp;sx = sx * dist / (sz + dist);<br> &nbsp;sy = sy * dist / (sz + dist);<br>}<br>void rotate(float &amp;x,float &amp;y,float &amp;z,int phi,int thet,int ksi)<br>{<br> &nbsp; float &nbsp;x_old, sx, sy;<br> &nbsp; float &nbsp;ax, ay, az;<br><br> &nbsp; ay =y*cos(phi*PI)-z*sin(phi*PI) ;<br> &nbsp; az =y*sin(phi*PI)+z*cos(phi*PI) ;<br><br> &nbsp; ax =az*cos(thet*PI)-x*sin(thet*PI) ;<br> &nbsp; az =az*sin(thet*PI)+x*cos(thet*PI) ;<br><br> &nbsp; x_old = ax;<br> &nbsp; ax =x_old*cos(ksi*PI)-ay*sin(ksi*PI) ;<br> &nbsp; ay =x_old*sin(ksi*PI)+ay*cos(ksi*PI) ;<br> &nbsp; sx = ax;<br> &nbsp; sy = ay;<br><br> &nbsp; &nbsp;if(Perspective1)<br> &nbsp; &nbsp; &nbsp; &nbsp;Perspective(&amp;sx, &amp;sy, &amp;az);<br><br> &nbsp; ax = sx;<br> &nbsp; ay = sy;<br> &nbsp; x=ax; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; y=ay; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; z=az;<br>}<br>]]></description>
        <author>AleXXKSyS</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92290</guid>
        <pubDate>Sat, 04 Jan 2003 15:40:33 +0000</pubDate>
        <title>Знатоки 3D-графики! Нужна матрица поворота...</title>
        <link>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92290</link>
        <description><![CDATA[Misha_Muhin: короче:каждый поворот объема можно разложить на 3 поворота по осям координат на некоторые углы<br>легче сделать так:берешь первую матрицу из пред. сообщения-это матрица поворота относительно первой оси;то же делаешь со второй и третьей осью<br>ВОТ И ВСЕ<br>]]></description>
        <author>Misha_Muhin</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92289</guid>
        <pubDate>Sat, 04 Jan 2003 14:21:59 +0000</pubDate>
        <title>Знатоки 3D-графики! Нужна матрица поворота...</title>
        <link>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92289</link>
        <description><![CDATA[hnkovr: И что задают эти углы?]]></description>
        <author>hnkovr</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92288</guid>
        <pubDate>Mon, 23 Dec 2002 08:24:27 +0000</pubDate>
        <title>Знатоки 3D-графики! Нужна матрица поворота...</title>
        <link>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92288</link>
        <description><![CDATA[S.Yu.Gubanov: Есть такая параметризация, называемая углами Эйлера phi, theta, psi. Сначала делаешь поворот в плоскости XY на угол phi<br>{{Cos[phi], -Sin[phi], 0},<br> &nbsp;{Sin[phi], Cos[phi], 0},<br> &nbsp;{0, 0, 1}},<br>потом в этой повернутой системе координат делаешь поворот в повернутой плоскости YZ на угол theta<br>{{1, 0, 0},<br> &nbsp;{0, Cos[theta], -Sin[theta]},<br> &nbsp;{0, Sin[theta], Cos[theta]}},<br>а потом опять (уже сильно повернутой) в плоскости XY делаешь поворот на угол psi<br>{{Cos[psi], -Sin[psi], 0},<br> &nbsp;{Sin[psi], Cos[psi], 0},<br> &nbsp;{0, 0, 1}};<br>В результате, искомая матрица поворота на Эйлеровы углы имеет вид<br>{{Cos[phi] Cos[psi] - Cos[theta] Sin[phi] Sin[psi], -Cos[psi] Sin[phi] - <br> &nbsp; &nbsp; &nbsp;Cos[phi] Cos[theta] Sin[psi], <br> &nbsp; &nbsp;Sin[psi] Sin[theta]}, <br> &nbsp;{Cos[psi] Cos[theta] Sin[phi] + Cos[phi] Sin[psi], <br> &nbsp; &nbsp;Cos[phi] Cos[psi] Cos[theta] - <br> &nbsp; &nbsp; &nbsp;Sin[phi] Sin[psi], -Cos[psi] Sin[theta]}, <br> &nbsp;{Sin[phi] Sin[theta], Cos[phi] Sin[theta], Cos[theta]}}<br><br>]]></description>
        <author>S.Yu.Gubanov</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92287</guid>
        <pubDate>Sat, 21 Dec 2002 00:14:15 +0000</pubDate>
        <title>Знатоки 3D-графики! Нужна матрица поворота...</title>
        <link>https://forum.sources.ru/index.php?showtopic=9507&amp;view=findpost&amp;p=92287</link>
        <description><![CDATA[hnkovr: ... вектора направления камеры (т.е. чтобы смотреть не в начало координат)]]></description>
        <author>hnkovr</author>
        <category>Алгоритмы</category>
      </item>
	
      </channel>
      </rss>
	