Kevin Ryde on Sun, 09 Apr 2017 08:17:09 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
geom.gp simple coordinate geometry

 To: pariusers@pari.math.ubordeaux.fr
 Subject: geom.gp simple coordinate geometry
 From: Kevin Ryde <user42_kevin@yahoo.com.au>
 Date: Sun, 09 Apr 2017 16:14:45 +1000
 Deliverydate: Sun, 09 Apr 2017 08:17:10 +0200
 Dkimsignature: v=1; a=rsasha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1491718621; bh=Xyw0BL348z+x/80Ohln+69pDd1V0nwFJhrJ0MytjSaQ=; h=From:To:Subject:Date:From:Subject; b=CVRJdhsfzd+W9QIJnandSvaRYuJzyhLYTXUX3w+aVaZ4ctZHeea31zkCEjPWIguH1w5OI2koaxQcOoD9Capo/f5cKjbAn0xpPExhL78OKHmL8lVDKHVAu0h/eWEWSErJwumNBXxLC14aZ3frt3IhxDBIAe51apW4G7yYKq9s7B4gbgaOq0gm8vYsiKoS08Th35NIG55+odzhpwWJhKPF9/rjTYAkEn+cSLEBim/vGx48fPha7MXFPeCCL2K1tRYDnlIjuKbWMKcBvfKl757IpOLm08qs+JtQ+y2A/ZKR5DTc7xqplzBgbEDvBQx42SMiOb5LDmrqGqjFNfZIlZyyPw==
 Organization: Bah Humbug
 Useragent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
I've used gp for some simple coordinate geometry like area, centroid,
minimum area rectangle, and inertia (plane shapes, but a little 3D).
I had a go at collecting up some bits in a presentable form,
http://user42.tuxfamily.org/parigeom/index.html
Coordinates are any of vec, col, col matrix, complex, or complex quad,
since I've used all of these in different contexts :). The main bits I
use are area of polygon, which is fairly simple, and inertia where I
found it easy to make one mistake after another so having checks for
final formulas is handy.