Computing: Free Pascal Programming

Conic sections.

Download Conics desktop application (Windows 64bit) Download Conics source code (Lazarus/Free Pascal)

Description: Geometry application, concerning the conic sections (parabola, ellipse, circle, hyperbola) in their standard form. The user chooses the conic type and enters the conic's equation arguments (leading coefficient for the parabola, radius for the circle, semi-major and semi-minor axis for the ellipse and the hyperbola) and the application calculates the most relevant values of the conic (vertices, foci, directrices, the hyperbola's asymptotes, eccentricity, linear eccentricity, semi-latus rectun, focal parameter) and, of course, draws the conic's curve.
A trackbar may be used to reduce or enlarge the drawing (selected values between 50:1 and 1:50). This allows proper drawings for a large range of equation arguments (if these are to small or to big, nothing will be drawn or the graph will not be readable...).

Possible extensions: The only parameters actually drawn on the graph are the center, always (0, 0) in standard form, the vertices and foci, the directrices and, for the hyperbola, the asymptotes. Drawing all relevant parameters should not be to difficult to implement... A more complex extension could be to consider a more general form of the conic, letting the user choose a given center.

Free Pascal features: Showing/hiding controls as needed. Changing label captions during runtime. Drawing mathematical curves, using bitmap canvas. Scaling canvas drawings. Usage of trackbars.


Conic sections PC application: Choosing the conic type and the equation parameters
Conic sections PC application: Parameter calculation and curve drawing