A Shorter Version….


Looking at Voronoi with python, someone remarked it’s complicated. Well here’s the simplified version without any GUI or pluff.

4 simple lines to get the above voronoi diagram..

from scipy.spatial import voronoi_plot_2d,Voronoi
data = np.random.rand(50,2)
var = Voronoi(data)

Do you know, voronoi has wide applications and can be used to determine optimum locations for cell phone towers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s