Pari/GP Geometry

This is some coordinate geometry functions for Pari/GP. Most are fairly simple lengths, areas, and inertia. Calculations are kept exact using quads as much as possible. See the comments in and for details.

geom_area_of_polygon([0, 1, 2+I, 1+2*I, I]) == 5/2 is basic functions. The additional has functions for mass moment of inertia represented in 3×3 matrices. Both are slightly preliminary in places, but do some useful things as far as they go.

This code is free software (free as in freedom), published under the terms of the GNU General Public License (v3 or higher). Download version 1 here, (21k, and sig) (30k, and sig)
geom-1.tar.gz (44k, and sig)

The tar file has some self-tests but just the .gp files are enough to run. The sig files are Gnu PG ascii armoured signatures generated from my key.

This page Copyright 2017 Kevin Ryde, except for the GPLv3 logo which is Copyright Free Software Foundation and used here in accordance with its terms.

(Back to the sitemap.)