[英]moving a point in 3d space
I have a point at 0,0,0 I rotate the point 30 deg around the Y axis, then 30 deg around the X axis. 我有一个0,0,0的点,我围绕Y轴旋转了30度,然后围绕X轴旋转了30度。 I then want to move the point 10 units forward.
然后,我想将点向前移动10个单位。
I know how to work out the new X and Y position 我知道如何计算新的X和Y位置
MovementX = cos(angle) * MoveDistance;
MovementY = sin(angle) * MoveDistance;
But then I realised that these values will change because of Z, won't they? 但是后来我意识到这些值会因为Z而改变,不是吗?
How do I work out Z and have I worked out X and Y correctly? 如何计算Z并正确计算X和Y?
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.