Computing: Free Pascal Programming

Graphical vector addition and subtraction.


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

Description: Generation of geometry exercises concerning the addition and subtraction of vectors. The exercises have to be resolved graphically, i.e. the user has to draw the different vectors and determine the resultant vector based on the drawing. The number of vectors may be chosen as 2, 3 or 4. As an (unselectable) option, the calculation of the resultant vector's magnitude and angle may be included for evaluation. Please note, that the program awaits all angles as positive values in degrees.
Help concerning the application usage and a brief description of how to add vectors graphically is included.

Improvement: Adding an Undo function to stepwise undo the drawings already done.

Change log:
Version 1.0 (January 2020):
    - Original program.
Version 1.0.1 (April 2023):
    - angle display error (-90°, 360°) fixed.

Free Pascal features: Usage of canvas for line drawings. Usage of the MouseDown event to get the x- and y-position of a mouse-click on a control. Control properties modification depending on actual situation. Addition of arrowheads to lines (classic Pascal procedure).

Screenshot:

Geometry exercises: Graphical addition of vectors (here 4)

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