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

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

    1. <tfoot id='h5Toi'></tfoot>
      • <bdo id='h5Toi'></bdo><ul id='h5Toi'></ul>

        围绕原点旋转一个点的正确三角法

        Proper Trigonometry For Rotating A Point Around The Origin(围绕原点旋转一个点的正确三角法)

        1. <legend id='RUGwB'><style id='RUGwB'><dir id='RUGwB'><q id='RUGwB'></q></dir></style></legend>

              <tfoot id='RUGwB'></tfoot>

              • <small id='RUGwB'></small><noframes id='RUGwB'>

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

                  本文介绍了围绕原点旋转一个点的正确三角法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  以下任何一种方法是否使用正确的数学方法来旋转一个点?如果有,哪一个是正确的?

                  Do either of the below approaches use the correct mathematics for rotating a point? If so, which one is correct?

                  POINT rotate_point(float cx,float cy,float angle,POINT p)
                  {
                    float s = sin(angle);
                    float c = cos(angle);
                  
                    // translate point back to origin:
                    p.x -= cx;
                    p.y -= cy;
                  
                    // Which One Is Correct:
                    // This?
                    float xnew = p.x * c - p.y * s;
                    float ynew = p.x * s + p.y * c;
                    // Or This?
                    float xnew = p.x * c + p.y * s;
                    float ynew = -p.x * s + p.y * c;
                  
                    // translate point back:
                    p.x = xnew + cx;
                    p.y = ynew + cy;
                  }
                  

                  推荐答案

                  这取决于你如何定义angle.如果它是逆时针测量的(这是数学惯例),那么正确的旋转是你的第一个:

                  It depends on how you define angle. If it is measured counterclockwise (which is the mathematical convention) then the correct rotation is your first one:

                  // This?
                  float xnew = p.x * c - p.y * s;
                  float ynew = p.x * s + p.y * c;
                  

                  但如果是顺时针测量,那么第二个是正确的:

                  But if it is measured clockwise, then the second is correct:

                  // Or This?
                  float xnew = p.x * c + p.y * s;
                  float ynew = -p.x * s + p.y * c;
                  

                  这篇关于围绕原点旋转一个点的正确三角法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  C# Attributes and their uses(C# 属性及其用途)
                  C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)

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

                        <tbody id='h3rbB'></tbody>
                      • <tfoot id='h3rbB'></tfoot>
                          <bdo id='h3rbB'></bdo><ul id='h3rbB'></ul>

                        • <legend id='h3rbB'><style id='h3rbB'><dir id='h3rbB'><q id='h3rbB'></q></dir></style></legend>

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