*
Cococubed.com


Fitting to Conic Sections

Home

Commercial:
Artwork
Software
Teaching materials
Bicycle sag support

Free:
Family Album
Pretty astronomy pictures
Some astronomy codes
... Stellar equation of states
... EOS with ionization
... EOS for supernovae
... Chemical potentials
... Stellar atmospheres
... Voigt Function
... 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

... 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

... EZ stellar evolution
... FLASH code
... Mesa code
Some astronomy talks
Some research
Bicycle adventures


Contact us:
J.D. Maldonado
F.X.Timmes, my vitae

Lots of codes exist for fitting a set a data to a straight line. How about fits to the other conic sections? The program fit_conic.f does a least squares fit to the general conic equation. The conic sections (circles, ellipses, parabolas, or hyperbolas) may be arbitrarily translated or rotated.

The program will generate noisy (x,y) data for any of the conic sections (interesting problem in its own right), fit the data to the general second order conic equation, and report back the best fitting conic section. Key attributes such as the center and foci coordinates, lengths of the semi-major and semi-minor axes, rotatation of the conic, and other goodies are reported.

Sometimes its more appropriate to fit data to a given conic section rather than a general conic. If you want to fit data to only circles try public_fit_circle.f . or public_fit_ellipse.f for only ellipses.


image
fitting to noisy circles
image
fitting noisy ellipses
image
fitting noisy hyperbolas
image
fitting noisy parabolas


 



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. If you're nice, offer co-authorship of the publication. At best, you'll love these programs so much that you'll send great wads of cash to me.