SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

Curve Class
Vive como se fosse morrer amanhã.
Estude como se fosse viver para sempre.
Einstein
< Parabola | Ellipse | Hiperbola >
  • Equation:
    [; \left( \frac{x-x_c}{a}\right)^2 + \left( \frac{y-y_c}{b} \right)^2=1 ;]
  • Parametrization:
    [; \left( \begin{array}{c} x(t)\\y(t) \end{array}\right) = \left( \begin{array}{c} x_c + a \cos{t}\\y_c + b \sin{t} \end{array}\right) ;]
Python Listing: Ellipse.py.
class Ellipse(Curve):
    
    self.C=Vector([1.0,1.0])
    self.a=2.0
    self.b=2.0

    def Ellipse(t):
        return self.C+Vector([
            self.a*cos(t),self.b*sin(t)
        ])
< Parabola | Ellipse | Hiperbola >
Messages:
0 secs.