通过改变一个轴将椭圆拟合到一点
该问题的图形如下: http://dl.dropbox.com/u/13390614/Question2.jpg
取一个与固定短轴对齐的椭圆,并沿其长轴拉伸椭圆,直到椭圆的周长与点(图中的 A)重合。新的主轴长度是多少?
当要修改两个轴时我可以解决这个问题,但当只修改一个轴时我很难过。
任何见解将不胜感激。
加里
A graphic of this problem is here:
http://dl.dropbox.com/u/13390614/Question2.jpg
Take an axis aligned ellipse with a fixed minor axis, and stretch the ellipse along its major axis till the ellipse's perimiter coincides with a point (A in the graphic). What is the new major axis length?
I can solve this problem when both axis are to be modified, but am stumped when only one axis is modified.
Any insights would be appreciated.
Gary
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,为了简化问题,我们假设椭圆位于原点。
想象它是一个圆,其直径是短轴。沿 y = P 的 y 的线的圆的宽度是多少?等价地,圆直径上的点的 x 是多少,其中 y = P 的 y。 (对此有两种解决方案。尽管您稍后可能需要调整符号,但都可以。)您可以使用三角定理或毕达哥拉斯定理来计算它。
您的长轴现在是短轴 * ((P's x) / x)。
First, let's pretend the ellipse is at the origin to simplify things.
Imagine it was a circle where the diameter is your minor axis. What would be the width of the circle along the line where y = P's y? Equivalently, what is the x of the point on the circle's diameter where y = P's y. (There are two solutions to this. Either will do, though you may need to adjust a sign later on.) You can compute this using either trig or Pythagorean theorem.
Your major axis is now minor axis * ((P's x) / x).
非常感谢劳伦斯的帮助,这似乎确实有效。
Gary
// 在代码中
由于椭圆和点是轴对齐的,
该点是一个向量。
将点 P 平移到短轴圆上
使用固定短轴长度和半径
点不断上升。
Many thanks for the help Laurence, that does seem to work.
Gary
// In code
Since the ellipse and point are axis aligned,
the point is a vector.
Translate the point P onto a circle of minor axis
radius using the fixed minor axis length and the
Point's constant rise.