|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionVoronoi Diagram is a useful mathematic abstraction which has many applications. You can read about it here and here. You can also see some examples here: Visualization of the 2D Voronoi Diagram and the Delaunay Triangulation and Fortune's Voronoi algorithm implemented in C#. BackgroundYesterday, I solved a problem: we have many weather centers and each weather center has coordinates (X, Y) and current temperature value (T). The goal of our solution was to create a temperature map. Using the codeThe structure public struct TemperatureLocation
{
private double x;
public double X
{
get { return x; }
set { x = value; }
}
private double y;
public double Y
{
get { return y; }
set { y = value; }
}
private double t;
public double T
{
get { return t; }
set { t = value; }
}
public TemperatureLocation(double x, double y, double t)
{
this.x = x;
this.y = y;
this.t = t;
}
public double GetDistance(TemperatureLocation tl)
{
return Math.Sqrt((this.x - tl.x) * (this.x - tl.x) +
(this.y - tl.y) * (this.y - tl.y));
}
}
The class Figure 1. Temperature map.
Points of interestCreating temperature maps is really a problem in meteorology. For a good mapping, we must use interpolation algorithms (for a smooth isotherm). It is one of many Voronoi diagram applications (Voronoi died exactly 100 years ago, on 11-19-1908).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||