Computing: Free Pascal Programming

Centroid and orthocenter of a triangle.


Centre de gravité et orthocentre d'un triangle (version française de cette page)
Download Triangles desktop application (Windows 64bit) Download Triangles source code (Lazarus/Free Pascal)

Description: Analytical geometry application, concerning two of the important points of triangles: the centroid (center of gravity), and the orthocenter. The user has to enter the coordinates of the three points that define the triangle. Besides the coordinates of the important point to find, the application calculates the equation of the 3 medians and the coordinates of their intersection with the triangle (centroid), resp. the equation of the 3 altitudes and the coordinates of their intersection with the triangle (orthocenter). The program also creates a graph of the triangle, the lines and the points (you can use the "zoom" feature to adjust the graph on the available drawing area).
To note, that the current version 1.0 does not draw a graph for the orthocenter, if the triangle is obtuse, case where the orthocenter is situated outside the triangle).

Programmers note: The code of the graph (and other) routines is rather messy and would have been reviewed and rewritten (using arrays instead of scalar values and using subroutines instead of the repetitive code).

Free Pascal features: Using bitmap canvas for mathematical drawings. Zooming in and out to fit a graph in the available drawing area. Trying to find the best place where to place text on a graph in order to get a "pretty display".

Screenshots:

Analytical geometry application: Medians and centroid of a triangle
Analytical geometry application: Altitudes and orthocenter of a triangle

If you like this application, please, support me and this website by signing my guestbook.