Drawing elliptical orbit in Python (using numpy, matplotlib)

后端 未结 3 599
轻奢々
轻奢々 2020-12-21 13:12

I wonder how can I draw elliptical orbit by using the equation ay2 + bxy + cx + dy + e = x2 ?

I have first determined the a,b,c,d,e constants a

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-21 13:33

    The easiest thing to do is rewrite in parametric form so that you end up with the expressions x = A cos(t); y = B sin(t). You then create a full ellipse by assigning t = [0, 2 * pi] and calculating the corresponding x and y.

    Read this article which explains how to move from a general quadratic form into a parametric form.

提交回复
热议问题