如何使一个点的轨道线路,3D [英] How to Make a Point Orbit a Line, 3D

查看:170
本文介绍了如何使一个点的轨道线路,3D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想找到盘旋空间中的点的环的方程,该环是垂直于正常远离该点

Essentially, i want to find the equation of the ring that circles a point in space, this ring is perpendicular to a normal away from this point.

我有一条线,在2点的形式, L1 L2

I have a line, in the form of 2 points, L1, L2;

我有正常的L1-> L2, N

I have the normal from L1->L2, N;

我有一个正常的L1-飞机> L2,其中L1位于。 斧子+ + CZ = D

I have the plane that is normal to L1->L2, which L1 lies on. ax + by + cz = d;

我有半径距离L1,研究

- >我想提出一点 V ,轨道绕点L1这一行;

-> I want to make a point V, orbit this line around point L1;

我想我必须做出一个圆形的公式在此平面与L1为原点。我不知道如何绘制二维方程到三维平面。

I think I have to make a circular equation in this plane with L1 as the origin. I have no idea how to plot a 2d equation onto a 3d plane.

或者,也许有人知道如何做到做到这一点的另一种方式,跨产品什么的?

Or maybe someone knows how to do do this another way, cross products or something?

推荐答案

这个问题实际上是需要一个平凡的解决方案。假设你有U =标准化(L2 - L1)和两个单位向量V和W,使得U,V,W相互正交

This problem actually requires a nontrivial solution. Suppose you have U = normalize(L2 - L1) and two unit vectors V and W such that U, V, W are pairwise orthogonal.

则f(A)= L1 + R *(V * COS(一)+ W *罪(一))的角度一个是方程式为你想要的圈子。

Then f(a) = L1 + R * (V * cos(a) + W * sin(a)) for angles a is the equation for the circle you want.

你怎么能找到W¯¯给出U和V? W能只是他们的跨产品。

How can you find W given U and V? W can just be their cross product.

你怎么能找到公式计算:Vü?这是它并不简单。有这样V的整体循环,可以选择的,所以我们不能只解决了的解决方案。

How can you find V given U? This is where it's not straightforward. There are a whole circle of such V that could be chosen, so we can't just solve for "the" solution.

下面是查找过程这样一个五令U =(UX上,乌伊,YZ)。

Here's a procedure for finding such a V. Let U = (Ux, Uy, Yz).

如果的Ux!= 0或UY!= 0,则V =标准化(交叉(U,(0,0,1)))
否则,如果的Ux!= 0或乌斯!= 0,则V =标准化(交叉(U,(0,1,0)))
否则U = 0,误差

If Ux != 0 or Uy != 0, then V = normalize(cross(U, (0,0,1)))
Else if Ux != 0 or Uz != 0, then V = normalize(cross(U, (0,1,0)))
Else U = 0, error

注意:您可以否定◆如果你想你的观点,以循环相反的方向

Note: You can negate W if you want your point to cycle in the opposite direction.

这篇关于如何使一个点的轨道线路,3D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆