Skip to content

Implementation of a Voronoi diagram in C++ using the SFML library and a fragment shader in GLSL

License

Notifications You must be signed in to change notification settings

maks-kovpak/voronoi-diagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voronoi diagram

My implementation of the Voronoi diagram. Points are generated randomly. By clicking on any point, it is highlighted and you can move it around the screen. You can also add new points with the left mouse button while holding down the Left Alt key. Note that the maximum number of points is 512, but you can increase this number in the code. The initial number of points is 20.

If you want to use Manhattan distance, in the voronoiColors.frag file add the line #define MANHATTAN (Manhattan distance is only implemented for the color mode).

To enable color mode, you need to add the line #define COLORS in the main file.

Using Manhattan distance

Without colors (only edges)

About

Implementation of a Voronoi diagram in C++ using the SFML library and a fragment shader in GLSL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published