Re: [R] voronoi tessellations

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Thu 20 Jul 2006 - 06:34:05 EST

On Wed, 19 Jul 2006, binabina@bellsouth.net wrote:

> Okay, been working with tripack, seems the most mature package for this.
> Got it to work well with their test data set - data(tritest). When i
> tried random numbers to explore further, i am getting some results that
> don't reconcile.
>
> example run this:
>
> library(tripack)
> y <- runif(100)
> x <- runif(100)
> vm <- voronoi.mosaic(x,y)
> plot(vm)
> par(new=T)
> plot(x,y,col='blue')

plot() changes the axis scales. Use points(x,y)

         -thomas

> when you look at the plot of the mosaic overlayed with the raw data, the
> mosaic should have each data point in 1 cell, however that is not the
> case - any help would be appreciated.
>
> However if you run
>
> data(tritest)
> x <- tritest$x
> y <- tritest$y
> vm <- voronoi.mosaic(x,y)
> plot(vm)
> par(new=T)
> plot(x,y,col='blue')
>
> it looks at it should.
>
> -zubin
>
>
>>
>> From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
>> Date: 2006/07/19 Wed AM 03:15:51 EDT
>> To: Don MacQueen <macq@llnl.gov>
>> CC: zubin <binabina@bellsouth.net>, r-help@stat.math.ethz.ch
>> Subject: Re: [R] voronoi tessellations
>>
>> On Tue, 18 Jul 2006, Don MacQueen wrote:
>>
>>> I'll suggest going to the CRAN packages page and doing a search for "voronoi".
>>
>> The problem here is that `Voronoi tessellation' is a secondary name. The
>> concept has many names, including Dirichlet tessellation and Thiessen
>> polygons, and Dirichlet has priority over Voronoi.
>>
>>> Also, search for 'triangulation', since that is one of the uses of them.
>>
>> I know of packages deldir, tripack and perhaps geometry.
>>
>>> -Don
>>>
>>> At 11:46 PM -0400 7/18/06, zubin wrote:
>>>> Hello, looking to draw a voronoi tessellations in R - can anyone
>>>> recommend a package that has tackled this?
>>>>
>>>> some background:
>>>>
>>>> i have a economic data set and created a sammons projection, like to now
>>>> overlay a voronoi tessellation over the sammons 2-D solution for a slick
>>>> visual, and potentially color each tessellation element based on a metric.
>>>>
>>>> home.u <- unique(home1)
>>>> home.dist <- dist(home.u)
>>>> home.sam <- sammon(home.dist,k=2)
>>>> plot(home.sam$points)
>>
>> Wait a minute. If this is sammon() from MASS (uncredited), it is not a
>> projection, and there is no relevant concept of distance between points in
>> the mapped space apart from between the supplied points.
>>
>> I suggest Zubin reads carefully the reference whose support software he
>> appears to be using. (It would also have answered his question.)
>>
>> --
>> Brian D. Ripley, ripley@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 272866 (PA)
>> Oxford OX1 3TG, UK Fax: +44 1865 272595
>>
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Jul 20 06:40:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 20 Jul 2006 - 08:22:47 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.