首页 > 解决方案 > 如何在给定坐标的codeworld haskell中绘制椭圆

问题描述

我需要在给定两个坐标的情况下画一个椭圆

Ellipse Coords
        Coords

但我不知道如何用顶点、共同顶点、焦点和中心点来做到这一点。我基本上对哪些点进入两个坐标感到困惑。到目前为止我有这个

Ellipse (a, b)(c, d)       = scaled(solidCircle(1) (???)
Circle (a, b)(c, d)        = (solidCircle (r))
                                            where xc = ((c-a)*(c-a))
                                                  yc = ((d-b)*(d-b))
                                                   r = sqrt(xc +yc)

当我使用缩放圆时,我包括了圆方程。

谢谢!

标签: haskellellipsecodeworld

解决方案


推荐阅读