Neighbor Sites for a Site

26 views
Skip to first unread message

Li

unread,
Oct 17, 2009, 6:15:49 PM10/17/09
to as3delaunay
Hello guys,

Does anyone know what would be the best way to identify the neighbors
for a given site point in a voronoi diagram, that is, any other site
that shares an edge with it.

I vaguely see 2 possible paths but they are both a bit obscure for me:
1) nearestSitePoint() uses a bitmapdata which I have no idea what its
supposed to be, so I don't know how to use the method and 2) there is
an Edge element which clearly has the information I need but it is
internal, so it cannot be used outside of the as3delaunay package.

Thanks for any info!

Alan Shaw

unread,
Oct 17, 2009, 8:47:23 PM10/17/09
to as3de...@googlegroups.com
Hi Li,
Clearly this is something that should be made available.
If I stick with the currrent model I'd make it a method of Voronoi:
neighborSitesForPoint(p:Point):Vector.<Point>.
Or maybe I should just make some of the internal classes public.
Any thoughts?

-A

Alan Shaw

unread,
Oct 18, 2009, 3:04:58 AM10/18/09
to as3de...@googlegroups.com
Spoke to Mario about this and he advised me to make the classes
public. I'll implement the function as well.

As for nearestSitePoint(), obviously documentation, or at least an
example program, is needed.

So: The repository contains a Flash Builder 4 project for the
library. I plan to add one or more new FB4 projects: the AsUnit test
suite, and maybe the rendering library I use for it, and some example
programs. I believe I'll put them in separate repositories.

-A

Li

unread,
Oct 18, 2009, 8:27:34 AM10/18/09
to as3de...@googlegroups.com
Cheers for the lightning fast response!
Being able to reach out to neighbors should give us some pretty interesting stuff to do.

Li

unread,
Oct 21, 2009, 1:36:43 AM10/21/09
to as3de...@googlegroups.com
Alan, could you please keep us posted on any progress on this topic? no pressure, I just don't want to miss this when its ready

Alan Shaw

unread,
Oct 21, 2009, 8:22:03 PM10/21/09
to as3de...@googlegroups.com
Voronoi.as now has the following method:

public function neighborSitesForSite(coord:Point):Vector.<Point>

-A

Li

unread,
Oct 22, 2009, 2:06:42 PM10/22/09
to as3de...@googlegroups.com
Thanks so much! I will give this a look asap =)
Reply all
Reply to author
Forward
0 new messages