From: Dave Stuart on 7 Apr 2010 23:31 I would like to calculate the areas of the voronoi polygons generated from data. I have used '[V,C] = voronoin(X)' to obtain verticies and cells of the voronoi diagram, but I am no sure how to calculate the area of the polygons. What is the best way to move forward? Thank You, Dave
From: Rune Allnor on 8 Apr 2010 03:27 On 8 apr, 05:31, "Dave Stuart" <dstu...(a)mines.edu> wrote: > I would like to calculate the areas of the voronoi polygons generated from data. I have used '[V,C] = voronoin(X)' to obtain verticies and cells of the voronoi diagram, but I am no sure how to calculate the area of the polygons. > What is the best way to move forward? First of all you need to ensure that the polygons are closed. Some of the voronoi polygons may be infinitiely large, extending to infinity. Once you know you are dealing with a closed ploygon you use Stoke's theorem (or maybe it was Green's theorem? Don't remember) and integrate the discretized line integral around the boundary of the plygon. The algorithm is very simple, although you might want to translate the point of gravity to coincide with origo for numerical reasons. Rune
From: Bruno Luong on 8 Apr 2010 04:10 "Dave Stuart" <dstuart(a)mines.edu> wrote in message <hpjilq$8v5$1(a)fred.mathworks.com>... > I would like to calculate the areas of the voronoi polygons generated from data. I have used '[V,C] = voronoin(X)' to obtain verticies and cells of the voronoi diagram, but I am no sure how to calculate the area of the polygons. > What is the best way to move forward? Take a look at function polyarea() Bruno
From: Stacey on 15 Apr 2010 13:17 On Apr 7, 10:31 pm, "Dave Stuart" <dstu...(a)mines.edu> wrote: > I would like to calculate the areas of the voronoi polygons generated from data. I have used '[V,C] = voronoin(X)' to obtain verticies and cells of the voronoi diagram, but I am no sure how to calculate the area of the polygons. > What is the best way to move forward? > > Thank You, > > Dave Did you ever figure out how to do this? I'm having trouble too...
From: Dave Stuart on 15 Apr 2010 14:56 Stacey <stlywo(a)gmail.com> wrote in message <664c397b-08ba-486e-8335-a26c397c3bbc(a)5g2000yqj.googlegroups.com>... > On Apr 7, 10:31 pm, "Dave Stuart" <dstu...(a)mines.edu> wrote: > > I would like to calculate the areas of the voronoi polygons generated from data. I have used '[V,C] = voronoin(X)' to obtain verticies and cells of the voronoi diagram, but I am no sure how to calculate the area of the polygons. > > What is the best way to move forward? > > > > Thank You, > > > > Dave > > Did you ever figure out how to do this? I'm having trouble too... I have not yet figured this out. Anybody who has used matlab for vornoi areas before, please feel free to chime in.
|
Next
|
Last
Pages: 1 2 Prev: opening large files with fopen/fread Next: Trying to speed up a script - any tips ? |