Skip to content

Implementations of the Jump Flooding algorithm used to generate Voronoi diagrams.

Notifications You must be signed in to change notification settings

eliyam32/jump-flooding-voronoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jump Flooding Voronoi

Author: Renato Farias ([email protected])
Created on: April 13th, 2012
Last updated on: June 13th, 2012
Purpose: To implement the Jump Flooding algorithm and use it to generate Voronoi diagrams. This technique is from the paper "Jump Flooding in GPU With Applications to Voronoi Diagram and Distance Transform" [Rong 2006].

CPU Implementation
The CPU implementation is simpler by far, but very slow.

  • The left mouse button places seeds. (If a Voronoi diagram has already been generated, you must clear it before placing new seeds.)
  • The right mouse button opens the pop-up menu.
  • 'c' clears the current diagram (if it has been created) and the seeds.
  • 'e' executes the Jump Flooding algorithm.
  • 'f' enters and leaves fullscreen mode.

GPU Implementation
The GPU implementation uses render-to-texture and shaders. It is fast enough to continuously update the Voronoi diagram when we apply a velocity to each seed so that it moves about the screen, which is nice to look at.

  • The right mouse button opens the pop-up menu.
  • 'r' generates a new set of random seeds.
  • If run from the command line, the first parameter can be used to specify how many seeds to generate. (This number is overriden if you regenerate later.)

About

Implementations of the Jump Flooding algorithm used to generate Voronoi diagrams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published