[R] convex hulls

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Aug 30 14:29:59 CEST 1999

On Mon, 30 Aug 1999, Agustin Lobo wrote:

> Does anybody know if there are functions to:
> 1. Define a convex hull on a space with more
> than 2 dimensions? chull just works for a plane.

That is a lot harder problem in computational geometry. Look at some
code called `hull' on netlib for the only public implementation I know of.

> 2. Numerically select elements within a given complex
> hull.

That is not too hard. You have the extreme points in clockwise (or
counter-clockwise, I forget) order. Just take the lines joining successive
pairs, and test if the point you want to test is to the right of all of
them.  I wrote code to do that when testing chull, but I suspect it would
take me longer to find it that for you to re-write it.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list