<i id='MOCwl'><tr id='MOCwl'><dt id='MOCwl'><q id='MOCwl'><span id='MOCwl'><b id='MOCwl'><form id='MOCwl'><ins id='MOCwl'></ins><ul id='MOCwl'></ul><sub id='MOCwl'></sub></form><legend id='MOCwl'></legend><bdo id='MOCwl'><pre id='MOCwl'><center id='MOCwl'></center></pre></bdo></b><th id='MOCwl'></th></span></q></dt></tr></i><div id='MOCwl'><tfoot id='MOCwl'></tfoot><dl id='MOCwl'><fieldset id='MOCwl'></fieldset></dl></div>
  • <small id='MOCwl'></small><noframes id='MOCwl'>

  • <legend id='MOCwl'><style id='MOCwl'><dir id='MOCwl'><q id='MOCwl'></q></dir></style></legend>
      • <bdo id='MOCwl'></bdo><ul id='MOCwl'></ul>

        <tfoot id='MOCwl'></tfoot>

        围绕特定点旋转(例如,围绕 0,0,0 旋转)

        Rotation around a specific point (eg, rotate around 0,0,0)(围绕特定点旋转(例如,围绕 0,0,0 旋转))
      1. <tfoot id='oqMEE'></tfoot>

            <legend id='oqMEE'><style id='oqMEE'><dir id='oqMEE'><q id='oqMEE'></q></dir></style></legend>
              <bdo id='oqMEE'></bdo><ul id='oqMEE'></ul>
                <tbody id='oqMEE'></tbody>
            • <i id='oqMEE'><tr id='oqMEE'><dt id='oqMEE'><q id='oqMEE'><span id='oqMEE'><b id='oqMEE'><form id='oqMEE'><ins id='oqMEE'></ins><ul id='oqMEE'></ul><sub id='oqMEE'></sub></form><legend id='oqMEE'></legend><bdo id='oqMEE'><pre id='oqMEE'><center id='oqMEE'></center></pre></bdo></b><th id='oqMEE'></th></span></q></dt></tr></i><div id='oqMEE'><tfoot id='oqMEE'></tfoot><dl id='oqMEE'><fieldset id='oqMEE'></fieldset></dl></div>

              1. <small id='oqMEE'></small><noframes id='oqMEE'>

                • 本文介绍了围绕特定点旋转(例如,围绕 0,0,0 旋转)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在搜索这个问题,但我真的找不到合适的答案.
                  我需要围绕给定点(例如,0,0,0)旋转圆柱体,但默认情况下给出圆柱体的枢轴.怎么改?

                  I've been searching a lot on this problem, but I couldn't really find an answer that would fit.
                  I need to rotate a cylinder around a given point (eg, 0,0,0), but the pivot of the cylinder is given by default. How do i change that?

                  我发现 这个主题,这正是我想做的,但我不知道如何用java来做.

                  I found this topic, and it's quite what I would want to do, but I don't know how to do it with java.

                  为了更好地解释我想要做什么,我将展示 3 张图片.(v)

                  To explain better what I would like to do, I'll show 3 images.(v)

                  imageshack.us/photo/my-images/259/aintgood.jpg

                  imageshack.us/photo/my-images/259/aintgood.jpg

                  imageshack.us/photo/my-images/840/whatineed.jpg

                  imageshack.us/photo/my-images/840/whatineed.jpg

                  imageshack.us/photo/my-images/705/nogoodn.jpg

                  imageshack.us/photo/my-images/705/nogoodn.jpg

                  所以,第一张图片显示了我的基本问题,圆柱体的末端应该位于球体的中心,比如说 (0,0,0).用户给出两个角度.第一个用于 rotX 命令,第二个用于 rotZ 命令.圆柱体的枢轴位于其中心,因此,如图 3 所示,即使我平移圆柱体使其末端位于球体的中心,当它旋转时,整个物体都会毁掉.

                  So, the first image shows my basic problem, the cylinder should be positioned with the end at the center of the sphere, let's say (0,0,0). The user gives two angles. The first one is for a rotX command, the second one for a rotZ one. The pivot of the cylinder is at its center, so, as image 3 shows, even if i translate the cylinder so its end is at the center of the sphere, when it rotates, the whole thing ruins.

                  图 2 显示了圆柱-球体组的外观,无论给定的角度如何.图像不是基于算法得到的,而是基于微积分,鼠标旋转得到的.

                  Image 2 shows what the cylinder-sphere group should look like, regardless the given angles. The image is not obtained based on an algorithm, but based on calculus, and mouserotated.

                  推荐答案

                  绕任意点P旋转的一般过程是:

                  The general procedure for rotation about an arbitrary point P is:

                  1. 按 -P 平移(所以 P 在 (0, 0, 0))
                  2. 绕原点旋转
                  3. 由 P 平移(将原点带回到 P 的原始位置)

                  最简单的方法是在 齐次坐标 中表示所有内容并表示平移和旋转通过矩阵.组合上述三个变换(translate-rotate-translate)是通过矩阵乘法完成的.如果旋转由两个或多个更简单的旋转组成,则旋转矩阵本身就是更简单旋转的矩阵的乘积.

                  The easiest way to do this is to represent everything in homogeneous coordinates and represent translations and rotations by matrices. Composing the above three transformations (translate-rotate-translate) is done by matrix multiplication. If the rotation is composed of two or more simpler rotations, then the rotation matrix itself is a product of the matrices for the simpler rotations.

                  这篇关于围绕特定点旋转(例如,围绕 0,0,0 旋转)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                  Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                  About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                  What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                  Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                  Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)

                  <small id='zfO8O'></small><noframes id='zfO8O'>

                    <tfoot id='zfO8O'></tfoot>
                      <tbody id='zfO8O'></tbody>
                        <i id='zfO8O'><tr id='zfO8O'><dt id='zfO8O'><q id='zfO8O'><span id='zfO8O'><b id='zfO8O'><form id='zfO8O'><ins id='zfO8O'></ins><ul id='zfO8O'></ul><sub id='zfO8O'></sub></form><legend id='zfO8O'></legend><bdo id='zfO8O'><pre id='zfO8O'><center id='zfO8O'></center></pre></bdo></b><th id='zfO8O'></th></span></q></dt></tr></i><div id='zfO8O'><tfoot id='zfO8O'></tfoot><dl id='zfO8O'><fieldset id='zfO8O'></fieldset></dl></div>
                          <bdo id='zfO8O'></bdo><ul id='zfO8O'></ul>

                          <legend id='zfO8O'><style id='zfO8O'><dir id='zfO8O'><q id='zfO8O'></q></dir></style></legend>