可微正交向量
有谁知道一个简单且可微的函数,可以将 3D 向量 u = (x, y, z) 转换为另一个与 u 正交的向量。
更准确地说,我正在寻找三个可微函数 {f, g, h}
,使得向量 u = (x, y, z)
正交于 < code>v = (f(x,y,z), g(x,y,z), h(x,y,z)) 且 v
仅当 < code>u 为零。
函数 {f, g, h}
应尽可能简单。我更喜欢它们是线性的,但我认为不存在这样的线性函数。低次多项式也很好。
PS我找到了这样的函数,但它们不是多项式。例如:
f(x, y, z) = y*(exp(x) + 3) - z*(exp(x) + 2)
g(x, y, z) = z*(exp(x) + 1) - x*(exp(x) + 3)
h(x, y, z) = x*(exp(x) + 2) - y*(exp(x) + 1)
它只是 (x,y,z) 与 (exp(x)+1, exp(x)+2, exp(x)+3) 的叉积。它满足除多项式之外的所有要求。但它们非常简单。
Does anybody know a simple and differentiable function that converts a 3D vector u = (x, y, z)
to another vector that is orthogonal to u
.
To be more precise, I am looking for three differentiable functions {f, g, h}
such that the vector u = (x, y, z)
is orthogonal to v = (f(x,y,z), g(x,y,z), h(x,y,z))
and v
is zero only if u
is zero.
The functions {f, g, h}
should be as simple as possible. I prefer them linear, but I think no such linear functions exist. Low degree polynomials are also good.
P.S. I found such functions, but they are not polynomials. For example:
f(x, y, z) = y*(exp(x) + 3) - z*(exp(x) + 2)
g(x, y, z) = z*(exp(x) + 1) - x*(exp(x) + 3)
h(x, y, z) = x*(exp(x) + 2) - y*(exp(x) + 1)
It's simply the cross product of (x,y,z) with (exp(x)+1, exp(x)+2, exp(x)+3). It satisfies all requirements except for being polynomials. But they are quite simple.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不存在这样的连续函数。这是“毛球”定理的结果,该定理指出不可能存在连续的永不消失的物体在球体上定义的切线场(如果您可以获得非零、连续且始终与
v
正交的F(v)
,则vF(v)
> 可用于轻松定义球体上连续的永不消失的切场)。另一方面,如果函数不需要连续,那么问题就很容易。我通常做的是选择
v
的 Y 和 Z 分量(绝对值)之间较大的那个,然后计算v
和(如果 Z 分量较大,则为 0, 1, 0)
;如果 Y 分量较大,则为(0, 0, 1)
。这避免了奇异性。No such a continuous function can exist. It's a consequence of the "hairy ball" theorem that states that there can be no continuous never-vanishing tangent field defined over a sphere (if you could get
F(v)
non-zero, continuous and always orthogonal tov
thenv-F(v)
could be used to easily define a continuous never-vanishing tangent field over a sphere).On the other hand if the function doesn't need to be continuous then the problem is easy. What I normally do is to pick what is the bigger between Y and Z component of
v
(in absolute value) and then computing the cross product betweenv
and(0, 1, 0)
if Z component is bigger or(0, 0, 1)
if Y component is bigger. This avoids the singularity.v = (y - z, z - x, x - y)
这似乎符合您的所有条件,除了非零
u
为非零。例如,u = (1, 1, 1)
将其炸毁。我怀疑你可能是对的,没有线性解决方案。v = (y - z, z - x, x - y)
This seems to match all your criteria, except for being non-zero for non-zero
u
. For example,u = (1, 1, 1)
blows it up. I suspect you may be right that there is no linear solution.