【问题标题】:JAVA: How to calculate a point in 2d Space?JAVA:如何计算二维空间中的点?
【发布时间】:2015-12-21 12:32:45
【问题描述】:

我正在尝试解决列为???XY 坐标

所有可用的变量,无需计算。

三角形旋转的空间点是静态的,长度和宽度也是静态的。但旋转角度不同。

如何解决??? 坐标?

【问题讨论】:

标签: java geometry trigonometry


【解决方案1】:

我在这里收到了我的问题的答案: http://mathhelpforum.com/trigonometry/255742-help-calculating-point-2d-space-rotating-right-angle-triangle.html#post883005

之后,我创建了一个简单的 java 函数,一旦给定了适当的变量,就可以为我处理所有这些。

child.rotationPointY = (Width * (MathHelper.sin(-parent.rotateAngleX))) + (Height * (MathHelper.cos(-parent.rotateAngleX))) + parent.rotationPointY;
child.rotationPointZ = (Width * (MathHelper.cos(-parent.rotateAngleX))) - (Height * (MathHelper.sin(-parent.rotateAngleX))) + parent.rotationPointZ;

谢谢大家

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-22
    • 1970-01-01
    • 2016-10-30
    • 1970-01-01
    相关资源
    最近更新 更多