Fitting to Conic Sections


Astronomy research
Software instruments
   Stellar equation of states
   EOS with ionization
   EOS for supernovae
   Chemical potentials
   Stellar atmospheres

   Voigt Function
   Jeans escape
   Polytropic stars
   Cold white dwarfs
   Hotter white dwarfs

   Cold neutron stars
   Stellar opacities
   Neutrino energy loss rates
   Ephemeris routines
   Fermi-Dirac functions

   Galactic chemical evolution
   Coating an ellipsoid
   Universal two-body problem

   Nuclear reaction networks
   Nuclear statistical equilibrium
   Laminar deflagrations
   CJ detonations
   ZND detonations

   Fitting to conic sections
   Unusual linear algebra
   Derivatives on uneven grids
   Pentadiagonal solver
   Quadratics, Cubics, Quartics

   Supernova light curves
   Exact Riemann solutions
   1D PPM hydrodynamics
   Verification problems
   Plane - cube Intersection

   The pendulum
   Circular and elliptical 3 body


   Zingale's software
   Brown's dStar
   GR1D code
   Iliadis' STARLIB database
   Herwig's NuGRID
   Meyer's NetNuc
Bicycle adventures

AAS Journals
2019 JINA R-process Workshop
2019 MESA Marketplace
2019 MESA Summer School
2019 AST111 Earned Admission
Teaching materials
Education and Public Outreach

Contact: F.X.Timmes
my one page vitae,
full vitae,
research statement, and
teaching statement.

Lots of tools exist for fitting a set a data to a straight line. How about fits to $$ a x^2 + b y^2 + c x y + d x + e y + f = 0 \label{eq1} \tag{1} $$ other specific conic sections? As of 2009, this remained an active field of research in computer vision. References that I found useful are Fitzgibbon et al 1999, Halir and Flusser 1998, O'Leary and Zsombor-Murray 2004, and Harker et al 2008.

For fitting data to an ellipse try using fit_ellipse.f90.zip, for a hyperbola fit_hyperbola.f90,zip, for a circle fit_circle.f90.zip, and if you do not care what kind of conic is fit try using fit_nonspecific_conic.f90.zip.

As configured, these tools will generate noisy (x,y) data for any of the conic sections (an interesting problem itself!), fit the data to the specified conic, and report key attributes such as the center coordinates, foci coordinates, lengths of the semi-major and semi-minor axes, rotatation angle of the conic, and so on.

fit to noiseless
and noisy data
fitting an ellipse to hyperbolic data
fit to noiseless
and noisy data
fitting a hyperbola to elliptical data
fiiting circles to data
fiiting a circle to elliptical data

Next up for these pages is a parabola specific fit to the algebraic distance (not too hard), and then geometric distance fitting for the ellipse, hyperbola, and parabola (medium hard).

Please cite the relevant references if you publish a piece of work that use these codes, pieces of these codes, or modified versions of them. Offer co-authorship as appropriate.