Hi, I'm Martin Džida, a software developer working in the automotive industry.
Click anywhere to spawn a point. Size of spawned point will be random between currently set minimal and maximal size. Point will also be given random velocity vector. Button Reset removes all points and button Undo removes last added point.
Current configuration can be seen by clicking on button Config. There you can set config you want and then press button Run to resume simulation. Same thing could also be achieved with keyboard key I for opening and closing configuration and keyboard key P for pausing and resuming simulation. If you are on Smartphone it is recommended to use input fileds below simulation window and button Set configuration. But all combinations of given are possible.
Buttons Run and Pause are shown depending of current state of simulation. You can use them for pausing and resuming simulation. When you pause simulation but configuration window is not open you can still play with adding and removing points.
There are few possible configuration parameters you can set and are listed bellow.
Algorthm name chooses one of the available algorithms for rendering.
NoAlgorithm renders only points.
ConvexHullNaive renders convex hull for all points using naive algorithm.
ConvexHullGraham renders convex hull for all points using Graham scan algorithm. It collors upper and lower hull differently.
ConvexHullJarvis renders convex hull for all points using Jarvis algorithm. Currently rendering doesn't differ from naive algorithm but if you have suggestions on how to color it send me an email :).
ConvexHullChan renders convex hull for all points using Chans algorithm. It renders jarvis outter hull red and graham scan inner upper and lower hulls orange and yellow respectively.
SpatialIndexingGrid renders spatial indexing method using uniform grid. It colors red those boxes which currently contain a point.
SpatialIndexingQuadTree renders spatial indexing method using quad tree. It renders quad tree nodes with maximum depth of 3.
This simulation has also some basic physics implemented. Explanation for each follows.
Collisions toggles collisions between particles. It currently uses mix of position based approach and approach decribled in here.
Global gravity toggles global gravity directed down for all particles.
Gravity per particle toggles gravity of each particle. When it is on, each particle will exert pulling force on other particles based on its size. Bigger the particle bigger the force.
Min size in pixels defines currently minimum size of point radius in pixels. Note: when resizing windows these will automatically change.
Max size in pixels defines currently maximal size of point radius in pixels. Note: when resizing windows these will automatically change.