轮换问题
我在给定框架(X,Y,Z)中有很多点(它们一起形成3d椭圆),然后我有向量(u,v,w)。我想要的是将椭圆沿向量 (u,v,w) 定向。有人对如何做到这一点有有用的想法吗?
I have lot of points (which together form a 3d ellipse) in a given frame (X, Y, Z) and then I have vector (u,v,w). What I want is to orient the ellipse along the vector (u,v,w) . Anyone has useful thoughts on how to go about doing that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我假设你可以通过查看什么适合 4 或 5 个点(我不记得是哪一个 - 但应该很容易从方程中找出来)来对椭圆方程进行逆向工程。一旦你知道了,你就可以知道两个主轴、椭圆的中心点和变换应该是直线的。
Well I assume you can reverse engineer the ellipse equation by seeing what fits into either 4 or 5 points (I can't remember which -- but it should be easy to figure out from the equations.) Once you have that you can know the two major axes, and center point for the ellipse and the transformation should be straight forward.
尽管我支持 @Paul Hsieh 的数学方法(并已投票),但另一种适用于许多任意细长形状的蛮力方法是:
Although I support @Paul Hsieh's mathematical approach (and have upvoted it), an alternative brute-force approach which will work for many arbitrary elongated shapes is: