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: pari-users@pari.math.u-bordeaux.fr
- Subject: geom.gp simple coordinate geometry
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Sun, 09 Apr 2017 16:14:45 +1000
- Delivery-date: Sun, 09 Apr 2017 08:17:10 +0200
- Dkim-signature: v=1; a=rsa-sha256; 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
- User-agent: 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/pari-geom/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.